From 37c73488f93c5423f0816de3d6be759e33fe8b94 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 29 Sep 2017 08:44:22 +0200 Subject: [PATCH] dbi plugin: Fix additional memory leaks. --- src/dbi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dbi.c b/src/dbi.c index 8b383f17..6043fe67 100644 --- a/src/dbi.c +++ b/src/dbi.c @@ -186,7 +186,10 @@ static void cdbi_database_free(cdbi_database_t *db) /* {{{ */ if (db->q_prep_areas) for (size_t i = 0; i < db->queries_num; ++i) udb_query_delete_preparation_area(db->q_prep_areas[i]); - free(db->q_prep_areas); + sfree(db->q_prep_areas); + /* N.B.: db->queries references objects "owned" by the global queries + * variable. Free the array here, but not the content. */ + sfree(db->queries); sfree(db); } /* }}} void cdbi_database_free */ -- 2.30.2