From ea13a759f5b32204e1a7bdf6ee228235acb42bcb Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 14 Nov 2013 10:33:30 +0100 Subject: [PATCH] virDomainEventCallbackListFree: Don't leak @list->callbacks The @list->callbacks is an array that is inflated whenever a new event is added, e.g. via virDomainEventCallbackListAddID(). However, when we are freeing the array, we free the items within it but forgot to actually free it. Signed-off-by: Michal Privoznik --- src/conf/domain_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index 16ae92b49f..19e392000e 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -147,6 +147,7 @@ virDomainEventCallbackListFree(virDomainEventCallbackListPtr list) (*freecb)(list->callbacks[i]->opaque); VIR_FREE(list->callbacks[i]); } + VIR_FREE(list->callbacks); VIR_FREE(list); } -- GitLab