From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
If we failed to make path for pts,
lxcContainerMountFSDevPTS will return the value
virAsprintf returned rather than -1.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
src/lxc/lxc_container.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index b1b63fb..2835463 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -952,7 +952,7 @@ static int lxcContainerMountFSDevPTS(virDomainDefPtr def,
def->name)) < 0)
return ret;
- if (virFileMakePath("/dev/pts") < 0) {
+ if ((ret = virFileMakePath("/dev/pts")) < 0) {
virReportSystemError(errno, "%s",
_("Cannot create /dev/pts"));
goto cleanup;
--
1.8.2.1