vahDeinit: Fix memory leak

Calling VIR_FREE on a virDomainDef* does not free its various contained
pointers.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-04-22 15:07:33 +02:00 committed by Ján Tomko
parent fa48004af5
commit 9ac2ca799a

View File

@ -79,7 +79,7 @@ vahDeinit(vahControl * ctl)
if (ctl == NULL)
return -1;
VIR_FREE(ctl->def);
virDomainDefFree(ctl->def);
virObjectUnref(ctl->caps);
virObjectUnref(ctl->xmlopt);
VIR_FREE(ctl->files);