mirror of https://gitee.com/openkylin/libvirt.git
parallels: fix parallelsDoCmdRun in case of command failure
Don't try to dereferece NULL pointer.
This commit is contained in:
parent
babe7dada0
commit
748b6d8e90
|
@ -55,7 +55,7 @@ parallelsDoCmdRun(char **outbuf, const char *binary, va_list list)
|
|||
cleanup:
|
||||
VIR_FREE(scmd);
|
||||
virCommandFree(cmd);
|
||||
if (ret)
|
||||
if (ret && outbuf)
|
||||
VIR_FREE(*outbuf);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue