mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: gluster: Don't leak private data when storage file init fails
In a44b7b87bc
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:
|
error:
|
||||||
VIR_FREE(priv->volname);
|
VIR_FREE(priv->volname);
|
||||||
glfs_fini(priv->vol);
|
glfs_fini(priv->vol);
|
||||||
|
VIR_FREE(priv);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user