mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user