]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virdbustest: Don't leak @out_strv1
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 4 Aug 2017 13:27:45 +0000 (15:27 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Aug 2017 08:44:06 +0000 (10:44 +0200)
In testMessageSingleArrayRef the string is doubly referenced.
Therefore we have to free also the first pointer to the string.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tests/virdbustest.c

index 3be9cf17eddaf74fba8adf2263a595217c8d1fdb..b7ddd77915fb92de78d6923aef8c9cc6474604d2 100644 (file)
@@ -323,6 +323,7 @@ static int testMessageSingleArrayRef(const void *args ATTRIBUTE_UNUSED)
  cleanup:
     if (out_strv1)
         VIR_FREE(out_strv1[0]);
+    VIR_FREE(out_strv1);
     virDBusMessageUnref(msg);
     return ret;
 }