[PATCH 05/11] lib/talloc: Add missing va_end() calls

Samuel Mendoza-Jonas sam.mj at au1.ibm.com
Thu Nov 12 15:34:35 AEDT 2015


Fixes Coverity defects #30485 and #30486

Signed-off-by: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
---
 lib/talloc/talloc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index dd10893..fa34323 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -984,6 +984,7 @@ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap)
 		talloc_set_name_const(ret, ret);
 	}
 
+	va_end(ap2);
 	return ret;
 }
 
@@ -1038,6 +1039,7 @@ static char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
 	vsnprintf(s+s_len, len+1, fmt, ap2);
 	talloc_set_name_const(s, s);
 
+	va_end(ap2);
 	return s;
 }
 
-- 
2.6.2



More information about the Petitboot mailing list