From: John Ferlan Date: Tue, 22 Jan 2013 14:15:42 +0000 (-0500) Subject: commandtest: Need to initialize 'errbuf' X-Git-Tag: v1.0.2-rc1~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e8502165f5b61cb57f753743d5ca75eaaebcd46;p=thirdparty%2Flibvirt.git commandtest: Need to initialize 'errbuf' It was possible to call VIR_FREE in cleanup prior to initialization --- diff --git a/tests/commandtest.c b/tests/commandtest.c index fd2b8c0cfb..b5c5882c99 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) {