From c1860f878be376b2778dc0590a94f8f8494a7c87 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 11 Nov 2011 20:45:31 +0100 Subject: [PATCH] * grub-core/kern/misc.c (grub_vprintf): Add missing va_end. (grub_xvasprintf): Likewise. --- ChangeLog | 5 +++++ grub-core/kern/misc.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index f98fd8e75..bdab31591 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-11 Vladimir Serbinenko + + * grub-core/kern/misc.c (grub_vprintf): Add missing va_end. + (grub_xvasprintf): Likewise. + 2011-11-11 Vladimir Serbinenko Add const keyword to grub_env_get and gettextize week days. diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index 34c9b3b0c..8dd7f453f 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -216,6 +216,8 @@ grub_vprintf (const char *fmt, va_list args) s = grub_vsnprintf_real (curbuf, s, fmt, ap2); } + va_end (ap2); + grub_xputs (curbuf); if (curbuf != buf) @@ -911,6 +913,9 @@ grub_xvasprintf (const char *fmt, va_list ap) return NULL; s = grub_vsnprintf_real (ret, as, fmt, ap2); + + va_end (ap2); + if (s <= as) return ret;