Code

dbi plugin: Fix memory leak.
authorPavel Rochnyack <pavel2000@ngs.ru>
Thu, 12 May 2016 10:24:00 +0000 (16:24 +0600)
committerFlorian Forster <octo@collectd.org>
Fri, 29 Sep 2017 06:41:31 +0000 (08:41 +0200)
Some memory was leaked when shutting down.

This is a partial back-port of 5ee365a.

Signed-off-by: Florian Forster <octo@collectd.org>
src/dbi.c

index d013e1410056e2b15415408fbb60466675720260..8b383f17dc4edafbcfc0c45fa5b084ffe2be83ba 100644 (file)
--- a/src/dbi.c
+++ b/src/dbi.c
@@ -172,7 +172,9 @@ static void cdbi_database_free(cdbi_database_t *db) /* {{{ */
     return;
 
   sfree(db->name);
+  sfree(db->select_db);
   sfree(db->driver);
+  sfree(db->host);
 
   for (size_t i = 0; i < db->driver_options_num; i++) {
     sfree(db->driver_options[i].key);