aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/sqlite_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-09 16:27:29 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-09 16:27:29 +0000
commit0b08477445e2e95e55c987b587cd403a7098c3a3 (patch)
tree8885ad9b074ba0b2f580e77743b1145d6d4ffc01 /src/libutil/sqlite_utils.c
parentf7ec728dc56abf1a8527684ce214018befb58098 (diff)
downloadrspamd-0b08477445e2e95e55c987b587cd403a7098c3a3.tar.gz
rspamd-0b08477445e2e95e55c987b587cd403a7098c3a3.zip
Fix varargs processing (found by coverity)
Diffstat (limited to 'src/libutil/sqlite_utils.c')
-rw-r--r--src/libutil/sqlite_utils.c5
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;
}