提交 dd08d9ff 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 09db97d3
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册