mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
storage: gluster: Don't leak private data when storage file init fails
In a44b7b87bcc6681e2939f65a3552fc96f68bc7b6 I've introduced a function that initializes a storage file wrapper object on gluster based volumes. The initialization function leaks the private data pointer in case of failure. This patch fixes it. Reported by John Ferlan.
This commit is contained in:
parent
8d8b32b0da
commit
ad95fa5957
@ -570,6 +570,7 @@ virStorageFileBackendGlusterInit(virStorageFilePtr file)
|
||||
error:
|
||||
VIR_FREE(priv->volname);
|
||||
glfs_fini(priv->vol);
|
||||
VIR_FREE(priv);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user