From 096ad1042a55c01aea5461fd80b623a42eba8cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 26 Aug 2004 06:25:28 +0000 Subject: [PATCH] Don't forget to va_end() the va_list we get from va_copy(). Submitted by: Sean McNeil MFC after: 3 days --- lib/libc/stdio/vfprintf.c | 1 + lib/libc/stdio/vfwprintf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index e4301299d735..ff688e7c86a8 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -1233,6 +1233,7 @@ number: if ((dprec = prec) >= 0) done: FLUSH(); error: + va_end(orgap); #ifndef NO_FLOATING_POINT if (dtoaresult != NULL) freedtoa(dtoaresult); diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c index 35d28048de3b..d93e507a53b2 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -1232,6 +1232,7 @@ number: if ((dprec = prec) >= 0) } done: error: + va_end(orgap); if (convbuf != NULL) free(convbuf); if (__sferror(fp))