aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Guryanov <dguryanov@parallels.com>2012-09-10 19:23:43 +0400
committerDaniel Veillard <veillard@redhat.com>2012-09-12 17:38:35 +0800
commit748b6d8e9013c69f28a85c88345e258beb809417 (patch)
tree2fbf757ae77d0c5ba3ec1e9cd2295ab196c23bc8 /src/parallels/parallels_utils.c
parentBackcompt for console devices in virDomainDeviceInfoIterate (diff)
downloadlibvirt-748b6d8e9013c69f28a85c88345e258beb809417.tar.gz
libvirt-748b6d8e9013c69f28a85c88345e258beb809417.tar.bz2
libvirt-748b6d8e9013c69f28a85c88345e258beb809417.zip
parallels: fix parallelsDoCmdRun in case of command failure
Don't try to dereferece NULL pointer.
Diffstat (limited to 'src/parallels/parallels_utils.c')
-rw-r--r--src/parallels/parallels_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parallels/parallels_utils.c b/src/parallels/parallels_utils.c
index 35766b72b..89a0d8979 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;
}