[libvirt] [PATCH] virStoragePoolDefParseSource: Don't leak @port

Michal Privoznik posted 1 patch 5 years, 1 month ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/181b68ad9d92dfbadd798fd58a2d9a43db96d549.1553013483.git.mprivozn@redhat.com
src/conf/storage_conf.c | 1 +
1 file changed, 1 insertion(+)
[libvirt] [PATCH] virStoragePoolDefParseSource: Don't leak @port
Posted by Michal Privoznik 5 years, 1 month ago
In a1c453dc088, during VIR_AUTOFREE() rewrite this wasn't done
properly. @port might be leaked because it's allocated in a for()
loop.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed under trivial rule.

 src/conf/storage_conf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 7dff566641..3ae0d7ab77 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -588,6 +588,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
                     goto cleanup;
                 }
             }
+            VIR_FREE(port);
         }
     }
 
-- 
2.19.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list