]> xenbits.xensource.com Git - libvirt.git/commitdiff
virStoragePoolDefParseSource: Don't leak @port
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 19 Mar 2019 16:35:21 +0000 (17:35 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 19 Mar 2019 16:36:27 +0000 (17:36 +0100)
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>
src/conf/storage_conf.c

index 7dff56664181e272b4140a6b498178beb8f5adf8..3ae0d7ab77223b992c68f449939e4554a2f9a8af 100644 (file)
@@ -588,6 +588,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
                     goto cleanup;
                 }
             }
+            VIR_FREE(port);
         }
     }