提交 4f169b0e 编写于 作者: M Michal Privoznik 提交者: Eric Blake

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: NMichal Privoznik <mprivozn@redhat.com>
(cherry picked from commit ea13a759)
上级 8342adef
...@@ -147,6 +147,7 @@ virDomainEventCallbackListFree(virDomainEventCallbackListPtr list) ...@@ -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);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册