From: Daniel P. Berrange Date: Wed, 22 Feb 2017 17:18:51 +0000 (+0000) Subject: libxl: fix empty string check for channel path X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dd08d9ffe8f823f8d288bb804990f747e9d14384;p=libvirt.git libxl: fix empty string check for channel path The libxl code was checking that a 'char *' was != '\0', instead of checking the first element in the string Signed-off-by: Daniel P. Berrange --- diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 57ec6611e6..ea28c93345 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -1121,7 +1121,7 @@ libxlDomainCreateChannelPTY(virDomainDefPtr def, libxl_ctx *ctx) &channelinfo); if (!ret && channelinfo.u.pty.path && - channelinfo.u.pty.path != '\0') { + *channelinfo.u.pty.path != '\0') { VIR_FREE(chr->source->data.file.path); ignore_value(VIR_STRDUP(chr->source->data.file.path, channelinfo.u.pty.path));