parallels: fix parallelsDoCmdRun in case of command failure

Don't try to dereferece NULL pointer.
This commit is contained in:
Dmitry Guryanov 2012-09-10 19:23:43 +04:00 committed by Daniel Veillard
parent babe7dada0
commit 748b6d8e90
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}