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

View File

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