From ad95fa59572c99c26959e6808a1e779a4ffed6de Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 14 Feb 2014 13:08:39 +0100 Subject: [PATCH] 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. --- src/storage/storage_backend_gluster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c index a9c33c2b48..202a441ba8 100644 --- a/src/storage/storage_backend_gluster.c +++ b/src/storage/storage_backend_gluster.c @@ -570,6 +570,7 @@ virStorageFileBackendGlusterInit(virStorageFilePtr file) error: VIR_FREE(priv->volname); glfs_fini(priv->vol); + VIR_FREE(priv); return -1; } -- GitLab