From 85391569ec996bf0523517d958c7082d1779b09c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 9 Feb 2016 16:27:29 +0000 Subject: [PATCH] Fix varargs processing (found by coverity) --- src/libutil/sqlite_utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.39.5