]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Fix incorrect VIR_FREE in virConfGetValueStringList
authorJohn Ferlan <jferlan@redhat.com>
Mon, 18 Jul 2016 17:58:52 +0000 (13:58 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jul 2016 11:51:10 +0000 (07:51 -0400)
Since we VIR_ALLOC_N to *values, the VIR_FREE should be done likewise

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/util/virconf.c

index a41f896f50194b34413bd2f6f0b17f9dd3e21c90..ee54072467178409f51aa370693fc93297b986c2 100644 (file)
@@ -1016,7 +1016,7 @@ int virConfGetValueStringList(virConfPtr conf,
                 return -1;
             if (cval->str &&
                 VIR_STRDUP((*values)[0], cval->str) < 0) {
-                VIR_FREE(values);
+                VIR_FREE(*values);
                 return -1;
             }
             break;