diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-09 16:27:29 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-10 23:10:39 +0000 |
commit | 85391569ec996bf0523517d958c7082d1779b09c (patch) | |
tree | d606b6bd5cf63e80fa9d4d080fed46cc5f125def | |
parent | 7ab24a3a77f76ec93b19e90289f7ec5c09a58975 (diff) | |
download | rspamd-85391569ec996bf0523517d958c7082d1779b09c.tar.gz rspamd-85391569ec996bf0523517d958c7082d1779b09c.zip |
Fix varargs processing (found by coverity)
-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; } |