mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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 <berrange@redhat.com>
This commit is contained in:
parent
09db97d3cb
commit
dd08d9ffe8
@ -1121,7 +1121,7 @@ libxlDomainCreateChannelPTY(virDomainDefPtr def, libxl_ctx *ctx)
|
|||||||
&channelinfo);
|
&channelinfo);
|
||||||
|
|
||||||
if (!ret && channelinfo.u.pty.path &&
|
if (!ret && channelinfo.u.pty.path &&
|
||||||
channelinfo.u.pty.path != '\0') {
|
*channelinfo.u.pty.path != '\0') {
|
||||||
VIR_FREE(chr->source->data.file.path);
|
VIR_FREE(chr->source->data.file.path);
|
||||||
ignore_value(VIR_STRDUP(chr->source->data.file.path,
|
ignore_value(VIR_STRDUP(chr->source->data.file.path,
|
||||||
channelinfo.u.pty.path));
|
channelinfo.u.pty.path));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user