diff options
-rw-r--r-- | src/libutil/sqlite_utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libutil/sqlite_utils.c b/src/libutil/sqlite_utils.c index a1fdd2a8b..7e80190e3 100644 --- a/src/libutil/sqlite_utils.c +++ b/src/libutil/sqlite_utils.c @@ -131,7 +131,6 @@ rspamd_sqlite3_run_prstmt (rspamd_mempool_t *pool, sqlite3 *db, GArray *stmts, } } - va_end (ap); retcode = sqlite3_step (stmt); if (retcode == nst->result) { @@ -167,6 +166,8 @@ rspamd_sqlite3_run_prstmt (rspamd_mempool_t *pool, sqlite3 *db, GArray *stmts, sqlite3_reset (stmt); } + va_end (ap); + return SQLITE_OK; } else if (retcode != SQLITE_DONE && retcode != SQLITE_OK && retcode != SQLITE_ROW) { @@ -179,6 +180,8 @@ rspamd_sqlite3_run_prstmt (rspamd_mempool_t *pool, sqlite3 *db, GArray *stmts, sqlite3_reset (stmt); } + va_end (ap); + return retcode; } |