From 5b6c18fadd753345fc8ef885a163c8dd0c91a94c Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 18 Oct 2017 19:29:24 -0500 Subject: [PATCH] watchlist: Fix memory leak --- src/watchlist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/watchlist.c b/src/watchlist.c index 061b193b..6166f827 100644 --- a/src/watchlist.c +++ b/src/watchlist.c @@ -128,12 +128,14 @@ static void __watchlist_clear(struct watchlist *watchlist) void watchlist_destroy(struct watchlist *watchlist) { __watchlist_clear(watchlist); + l_queue_destroy(watchlist->items, NULL); watchlist->items = NULL; } void watchlist_free(struct watchlist *watchlist) { __watchlist_clear(watchlist); + l_queue_destroy(watchlist->items, NULL); l_free(watchlist); }