Patchwork [05/11] sqlite3: add sanity checking

login
register
mail settings
Submitter Eric Leblond
Date May 10, 2013, 6:48 a.m.
Message ID <1368168538-29780-6-git-send-email-eric@regit.org>
Download mbox | patch
Permalink /patch/242912/
State Accepted
Headers show

Comments

Eric Leblond - May 10, 2013, 6:48 a.m.
Nullify sqlite3 handler at deinit.

Signed-off-by: Eric Leblond <eric@regit.org>
---
 output/sqlite3/ulogd_output_SQLITE3.c |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/output/sqlite3/ulogd_output_SQLITE3.c b/output/sqlite3/ulogd_output_SQLITE3.c
index f9f2462..5c49055 100644
--- a/output/sqlite3/ulogd_output_SQLITE3.c
+++ b/output/sqlite3/ulogd_output_SQLITE3.c
@@ -431,6 +431,8 @@  sqlite3_stop(struct ulogd_pluginstance *pi)
 
 	sqlite3_close(priv->dbh);
 
+	priv->dbh = NULL;
+
 	return 0;
 }