[vlc-commits] Add missing va_end (cid #1049746)

Rémi Duraffort git at videolan.org
Tue Jul 23 10:19:42 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 22 19:46:16 2013 +0200| [56c650e83ccb64a0c8b73057bdf3d29425aff3d6] | committer: Jean-Baptiste Kempf

Add missing va_end (cid #1049746)

(cherry picked from commit 9ed7eb3ab9e0bec7f6351eb44fd67d1424f70bf9)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=56c650e83ccb64a0c8b73057bdf3d29425aff3d6
---

 modules/gui/ncurses.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index ed4617b..89761f5 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -599,10 +599,12 @@ static void mvnprintw(int y, int x, int w, const char *p_fmt, ...)
         return;
 
     va_start(vl_args, p_fmt);
-    if (vasprintf(&p_buf, p_fmt, vl_args) == -1)
-        return;
+    int i_ret = vasprintf(&p_buf, p_fmt, vl_args);
     va_end(vl_args);
 
+    if (i_ret == -1)
+        return;
+
     len = strlen(p_buf);
 
     wchar_t wide[len + 1];



More information about the vlc-commits mailing list