[PATCH 1/9] util: Fix incorrect VIR_FREE in virConfGetValueStringList

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we VIR_ALLOC_N to *values, the VIR_FREE should be done likewise

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/util/virconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virconf.c b/src/util/virconf.c
index a41f896..ee54072 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -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;
-- 
2.5.5

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]