[PATCH 06/14] commandtest: Need to initialize 'errbuf'

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

 



It was possible to call VIR_FREE in cleanup prior to initialization
---
 tests/commandtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/commandtest.c b/tests/commandtest.c
index fd2b8c0..b5c5882 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -656,7 +656,7 @@ static int test17(const void *unused ATTRIBUTE_UNUSED)
     virCommandPtr cmd = virCommandNew("true");
     int ret = -1;
     char *outbuf;
-    char *errbuf;
+    char *errbuf = NULL;
 
     virCommandSetOutputBuffer(cmd, &outbuf);
     if (outbuf != NULL) {
-- 
1.7.11.7

--
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]