From: John Ferlan Date: Tue, 22 Jan 2013 14:15:45 +0000 (-0500) Subject: virsh: Need to intialize 'str' X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0ce43ca4ab5c633f5fa56345811e454db0e64d3c;p=libvirt.git virsh: Need to intialize 'str' It was possible to call VIR_FREE in error prior to initialization. --- diff --git a/tools/virsh.c b/tools/virsh.c index 908c6a117d..27ed51173a 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2268,7 +2268,7 @@ vshOutputLogFile(vshControl *ctl, int log_level, const char *msg_format, va_list ap) { virBuffer buf = VIR_BUFFER_INITIALIZER; - char *str; + char *str = NULL; size_t len; const char *lvl = ""; time_t stTime;