From 748b6d8e9013c69f28a85c88345e258beb809417 Mon Sep 17 00:00:00 2001 From: Dmitry Guryanov Date: Mon, 10 Sep 2012 19:23:43 +0400 Subject: [PATCH] parallels: fix parallelsDoCmdRun in case of command failure Don't try to dereferece NULL pointer. --- src/parallels/parallels_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parallels/parallels_utils.c b/src/parallels/parallels_utils.c index 35766b72b5..89a0d8979e 100644 --- a/src/parallels/parallels_utils.c +++ b/src/parallels/parallels_utils.c @@ -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; }