Blame SOURCES/libvirt-RHEL-conf-storage-Fix-a-memory-leak-in-virStoragePoolDefParseSource.patch

99cbc7
From b5f39d1ad467ab712d41f693f998c6a9e3046b4f Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <b5f39d1ad467ab712d41f693f998c6a9e3046b4f@dist-git>
99cbc7
From: Erik Skultety <eskultet@redhat.com>
99cbc7
Date: Wed, 10 Apr 2019 10:25:01 +0200
99cbc7
Subject: [PATCH] RHEL: conf: storage: Fix a memory leak in
99cbc7
 virStoragePoolDefParseSource
99cbc7
MIME-Version: 1.0
99cbc7
Content-Type: text/plain; charset=UTF-8
99cbc7
Content-Transfer-Encoding: 8bit
99cbc7
99cbc7
https://bugzilla.redhat.com/show_bug.cgi?id=1584663
99cbc7
99cbc7
RHEL-only
99cbc7
99cbc7
Commit acf8c561 backported an upstream memory leak in @ver variable that
99cbc7
was later fixed upstream by using AUTOFREE which is not available
99cbc7
downstream, so we need a downstream fix. The issue was reported by
99cbc7
coverity.
99cbc7
99cbc7
Signed-off-by: Erik Skultety <eskultet@redhat.com>
99cbc7
Message-Id: <b6665d1280309b887aa237c71cba7b66cbe593f2.1554884692.git.eskultet@redhat.com>
99cbc7
Reviewed-by: Ján Tomko <jtomko@redhat.com>
99cbc7
---
99cbc7
 src/conf/storage_conf.c | 1 +
99cbc7
 1 file changed, 1 insertion(+)
99cbc7
99cbc7
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
99cbc7
index 5a124a0a2f..e171425239 100644
99cbc7
--- a/src/conf/storage_conf.c
99cbc7
+++ b/src/conf/storage_conf.c
99cbc7
@@ -566,6 +566,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
99cbc7
  cleanup:
99cbc7
     ctxt->node = relnode;
99cbc7
 
99cbc7
+    VIR_FREE(ver);
99cbc7
     VIR_FREE(port);
99cbc7
     VIR_FREE(nodeset);
99cbc7
     virStorageAuthDefFree(authdef);
99cbc7
-- 
99cbc7
2.21.0
99cbc7