1
0
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:
Peter Krempa 2014-02-14 13:08:39 +01:00
parent 8d8b32b0da
commit ad95fa5957

View File

@ -570,6 +570,7 @@ virStorageFileBackendGlusterInit(virStorageFilePtr file)
error:
VIR_FREE(priv->volname);
glfs_fini(priv->vol);
VIR_FREE(priv);
return -1;
}