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

John Ferlan jferlan at redhat.com
Tue Jan 22 14:15:42 UTC 2013


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




More information about the libvir-list mailing list