diff options
author | Eric Leblond <eric@inl.fr> | 2009-03-10 07:37:38 +0100 |
---|---|---|
committer | Eric Leblond <eric@inl.fr> | 2009-03-10 07:37:38 +0100 |
commit | ff354cf08c43f607d42990e6e93c70204046dda3 (patch) | |
tree | 583ef2a79738a422c9bda4b23deaf2c3b782fd98 /util | |
parent | c34eddedd3306749d6c03dd65aa55dff0ff512f3 (diff) |
db plugins: free memory at exit.
This patches frees an allocated buffer when ulogd is quitting.
Diffstat (limited to 'util')
-rw-r--r-- | util/db.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; } |