From ff354cf08c43f607d42990e6e93c70204046dda3 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 10 Mar 2009 07:37:38 +0100 Subject: db plugins: free memory at exit. This patches frees an allocated buffer when ulogd is quitting. --- util/db.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'util') 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; } -- cgit v1.2.3