From: Michal Privoznik Date: Thu, 14 Nov 2013 09:33:30 +0000 (+0100) Subject: virDomainEventCallbackListFree: Don't leak @list->callbacks X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ce75164fc5037d2e7f6b36de4aad1e3ecd74470;p=thirdparty%2Flibvirt.git 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 (cherry picked from commit ea13a759f5b32204e1a7bdf6ee228235acb42bcb) --- 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); }