Free dom->deprecations when free'ing virDomainObj Signed-off-by: Luke Yue <lukedyue@xxxxxxxxx> --- src/conf/domain_conf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 09da4ab952..7e1d30bdb2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3730,6 +3730,16 @@ void virDomainDefFree(virDomainDef *def) g_free(def); } +static void +virDomainObjDeprecationFree(virDomainObj *dom) +{ + size_t i = 0; + for (i = 0; i < dom->ndeprecations; i++) { + g_free(dom->deprecations[i]); + } + g_free(dom->deprecations); +} + static void virDomainObjDispose(void *obj) { virDomainObj *dom = obj; @@ -3742,6 +3752,7 @@ static void virDomainObjDispose(void *obj) if (dom->privateDataFreeFunc) (dom->privateDataFreeFunc)(dom->privateData); + virDomainObjDeprecationFree(dom); virDomainSnapshotObjListFree(dom->snapshots); virDomainCheckpointObjListFree(dom->checkpoints); } -- 2.32.0