mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
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…
x
Reference in New Issue
Block a user