[lxc-devel] [lxc/master] coverity: #1425747

2xsec on Github lxc-bot at linuxcontainers.org
Mon Jun 11 02:26:20 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 371 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180611/e3ed3e24/attachment.bin>
-------------- next part --------------
From 8f55c74292c5789bde980e2a2fbb2599c26bfa02 Mon Sep 17 00:00:00 2001
From: Donghwa Jeong <dh48.jeong at samsung.com>
Date: Mon, 11 Jun 2018 11:24:46 +0900
Subject: [PATCH] coverity: #1425747

Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong at samsung.com>
---
 src/lxc/lxccontainer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 1196656b2..4a8a56072 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -1384,7 +1384,7 @@ static bool create_run_template(struct lxc_container *c, char *tpath,
 				ret = mount(src, bdev->dest, "bind", MS_BIND | MS_REC, NULL);
 				if (ret < 0) {
 					ERROR("Failed to mount rootfs");
-					return -1;
+					_exit(EXIT_FAILURE);
 				}
 			} else {
 				ret = bdev->ops->mount(bdev);


More information about the lxc-devel mailing list