[Ulogd,3/4] sqlite3: add sanity checking

Submitted by Eric Leblond on March 18, 2013, 12:01 a.m.

Details

Message ID 1363564884-5957-4-git-send-email-eric@regit.org
State Not Applicable
Headers show

Commit Message

Eric Leblond March 18, 2013, 12:01 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 hide | download patch | download mbox

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;
 }