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 <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2013-11-14 10:33:30 +01:00
parent a593675594
commit ea13a759f5

View File

@ -147,6 +147,7 @@ virDomainEventCallbackListFree(virDomainEventCallbackListPtr list)
(*freecb)(list->callbacks[i]->opaque);
VIR_FREE(list->callbacks[i]);
}
VIR_FREE(list->callbacks);
VIR_FREE(list);
}