mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
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> (cherry picked from commit ea13a759f5b32204e1a7bdf6ee228235acb42bcb)
This commit is contained in:
parent
8342adeffb
commit
4f169b0e13
@ -147,6 +147,7 @@ virDomainEventCallbackListFree(virDomainEventCallbackListPtr list)
|
|||||||
(*freecb)(list->callbacks[i]->opaque);
|
(*freecb)(list->callbacks[i]->opaque);
|
||||||
VIR_FREE(list->callbacks[i]);
|
VIR_FREE(list->callbacks[i]);
|
||||||
}
|
}
|
||||||
|
VIR_FREE(list->callbacks);
|
||||||
VIR_FREE(list);
|
VIR_FREE(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user