3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-01-03 10:32:33 +01:00

watchlist: Fix memory leak

This commit is contained in:
Denis Kenzior 2017-10-18 19:29:24 -05:00
parent 8ce787557f
commit 5b6c18fadd

View File

@ -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);
}