[lxc-devel] [lxc/master] conf: va_end was not called.

2xsec on Github lxc-bot at linuxcontainers.org
Wed May 30 02:37:03 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 493 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180530/02dc419a/attachment.bin>
-------------- next part --------------
From 7b5a2435a2c7ba0cc6bf5a28680bd2e2efea4890 Mon Sep 17 00:00:00 2001
From: Donghwa Jeong <dh48.jeong at samsung.com>
Date: Tue, 29 May 2018 22:01:27 +0900
Subject: [PATCH] conf: va_end was not called.

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

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index d7984bd0f..4d98074e5 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -530,8 +530,10 @@ int run_script(const char *name, const char *section, const char *script, ...)
 		int len = size - ret;
 		int rc;
 		rc = snprintf(buffer + ret, len, " %s", p);
-		if (rc < 0 || rc >= len)
+		if (rc < 0 || rc >= len) {
+			va_end(ap);
 			return -1;
+		}
 		ret += rc;
 	}
 	va_end(ap);


More information about the lxc-devel mailing list