Make sure that ecpglib's statement variable has a defined value no matter what.
authorMichael Meskes
Tue, 29 Jan 2019 13:50:16 +0000 (14:50 +0100)
committerMichael Meskes
Wed, 30 Jan 2019 09:39:32 +0000 (10:39 +0100)
src/interfaces/ecpg/ecpglib/execute.c

index e25f7ebf825b7ef409a3aa46c7f1e6ad4217156b..4c499fb457df2ad6c0c9506f32a239bb6133bd2e 100644 (file)
@@ -1755,7 +1755,7 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
                 enum ECPG_statement_type statement_type, const char *query,
                 va_list args, struct statement **stmt_out)
 {
-   struct statement *stmt;
+   struct statement *stmt = NULL;
    struct connection *con;
    enum ECPGttype type;
    struct variable **list;