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

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 20:15:35 2013 +0200| [c67aa0337fc1ba7480ce32381d8283e483db559f] | committer: Jean-Baptiste Kempf

Add missing va_end (cid #1049747)

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

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

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

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 89761f5..847fdfe 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -689,9 +689,10 @@ static void MainBoxWrite(intf_sys_t *sys, int l, 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;
 
     if (b_selected) attron(A_REVERSE);
     mvnprintw(sys->box_y + l - sys->box_start, 1, COLS - 2, "%s", p_buf);



More information about the vlc-commits mailing list