[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] m4_error: fix missing va_end
From: |
Eric Blake |
Subject: |
[PATCH] m4_error: fix missing va_end |
Date: |
Fri, 29 Apr 2011 14:19:10 -0600 |
Most va_end implementations are no-ops, so it probably didn't
affect many people, but POSIX requires all va_start to be
matched with va_end for the rare platform where va_end is not
a no-op. Detected by Coverity.
* src/m4.c (m4_error, m4_error_at_line): Add missing va_end.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 5 +++++
src/m4.c | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 894ca8b..862b516 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-29 Eric Blake <address@hidden>
+
+ m4_error: fix missing va_end
+ * src/m4.c (m4_error, m4_error_at_line): Add missing va_end.
+
2011-03-01 Eric Blake <address@hidden>
Release Version 1.4.16.
diff --git a/src/m4.c b/src/m4.c
index d7ad7cd..6f1645a 100644
--- a/src/m4.c
+++ b/src/m4.c
@@ -99,6 +99,7 @@ m4_error (int status, int errnum, const char *format, ...)
current_line, format, args);
if (fatal_warnings && ! retcode)
retcode = EXIT_FAILURE;
+ va_end (args);
}
/*-------------------------------.
@@ -114,6 +115,7 @@ m4_error_at_line (int status, int errnum, const char *file,
int line,
verror_at_line (status, errnum, line ? file : NULL, line, format, args);
if (fatal_warnings && ! retcode)
retcode = EXIT_FAILURE;
+ va_end (args);
}
#ifndef SIGBUS
--
1.7.4.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] m4_error: fix missing va_end,
Eric Blake <=