summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2009-03-10 07:37:38 +0100
committerEric Leblond <eric@inl.fr>2009-03-10 07:37:38 +0100
commitff354cf08c43f607d42990e6e93c70204046dda3 (patch)
tree583ef2a79738a422c9bda4b23deaf2c3b782fd98
parentc34eddedd3306749d6c03dd65aa55dff0ff512f3 (diff)
db plugins: free memory at exit.
This patches frees an allocated buffer when ulogd is quitting.
-rw-r--r--util/db.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/db.c b/util/db.c
index 7ab609d..fee91b2 100644
--- a/util/db.c
+++ b/util/db.c
@@ -193,6 +193,13 @@ int ulogd_db_stop(struct ulogd_pluginstance *upi)
free(upi->input.keys);
upi->input.keys = NULL;
}
+
+ /* try to free the buffer for insert statement */
+ if (di->stmt) {
+ free(di->stmt);
+ di->stmt = NULL;
+ }
+
return 0;
}