]> xenbits.xensource.com Git - libvirt.git/commitdiff
commandtest: Need to initialize 'errbuf'
authorJohn Ferlan <jferlan@redhat.com>
Tue, 22 Jan 2013 14:15:42 +0000 (09:15 -0500)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Jan 2013 16:29:25 +0000 (17:29 +0100)
It was possible to call VIR_FREE in cleanup prior to initialization

tests/commandtest.c

index fd2b8c0cfbf6a28895b755c7a180f0f23bc2045d..b5c5882c99746ff320f66bb22c589126ce24be48 100644 (file)
@@ -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) {