mirror of https://gitee.com/openkylin/libvirt.git
virStorageSourceClear: Unref @vhostuser
The @vhostuser member of virStorageSource structure is allocated during parsing in virDomainDiskSourceVHostUserParse() but never freed leading to a memleak. Since the member is an object it has to be unrefed instead of g_free()-d. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
7415e72e68
commit
676e56e515
|
@ -1125,6 +1125,7 @@ virStorageSourceClear(virStorageSourcePtr def)
|
|||
virStorageEncryptionFree(def->encryption);
|
||||
virStoragePRDefFree(def->pr);
|
||||
virStorageSourceNVMeDefFree(def->nvme);
|
||||
virObjectUnref(def->vhostuser);
|
||||
virStorageSourceSeclabelsClear(def);
|
||||
virStoragePermsFree(def->perms);
|
||||
VIR_FREE(def->timestamps);
|
||||
|
|
Loading…
Reference in New Issue