Blame SOURCES/libvirt-storage-gluster-Don-t-leak-private-data-when-storage-file-init-fails.patch

c401cc
From d1096d0e37014342aca0ffcb879eed62bf7a098e Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <d1096d0e37014342aca0ffcb879eed62bf7a098e@dist-git>
c401cc
From: Peter Krempa <pkrempa@redhat.com>
c401cc
Date: Wed, 26 Feb 2014 14:55:32 +0100
c401cc
Subject: [PATCH] storage: gluster: Don't leak private data when storage file
c401cc
 init fails
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1032370
c401cc
c401cc
In a44b7b87bcc6681e2939f65a3552fc96f68bc7b6 I've introduced a function
c401cc
that initializes a storage file wrapper object on gluster based volumes.
c401cc
c401cc
The initialization function leaks the private data pointer in case of
c401cc
failure. This patch fixes it.
c401cc
c401cc
Reported by John Ferlan.
c401cc
c401cc
(cherry picked from commit ad95fa59572c99c26959e6808a1e779a4ffed6de)
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 src/storage/storage_backend_gluster.c | 1 +
c401cc
 1 file changed, 1 insertion(+)
c401cc
c401cc
diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c
c401cc
index f17ffea..01c5573 100644
c401cc
--- a/src/storage/storage_backend_gluster.c
c401cc
+++ b/src/storage/storage_backend_gluster.c
c401cc
@@ -544,6 +544,7 @@ virStorageFileBackendGlusterInit(virStorageFilePtr file)
c401cc
 error:
c401cc
     VIR_FREE(priv->volname);
c401cc
     glfs_fini(priv->vol);
c401cc
+    VIR_FREE(priv);
c401cc
 
c401cc
     return -1;
c401cc
 }
c401cc
-- 
c401cc
1.9.0
c401cc