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

Rémi Duraffort git at videolan.org
Mon Jul 22 20:15:55 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 22 19:41:20 2013 +0200| [3a5100e88b4c0f5f8db340ed9859915ea24d479c] | committer: Rémi Duraffort

Add missing va_end (cid #1049744)

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

 modules/access/zip/zipstream.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
index 6b6729c..2791925 100644
--- a/modules/access/zip/zipstream.c
+++ b/modules/access/zip/zipstream.c
@@ -136,15 +136,15 @@ inline static void free_all_node( node *root )
 /* Allocate strcat and format */
 static int astrcatf( char **ppsz_dest, const char *psz_fmt_src, ... )
 {
+    char *psz_tmp;
     va_list args;
-    va_start( args, psz_fmt_src );
 
-    char *psz_tmp;
+    va_start( args, psz_fmt_src );
     int i_ret = vasprintf( &psz_tmp, psz_fmt_src, args );
-    if( i_ret == -1 ) return -1;
-
     va_end( args );
 
+    if( i_ret == -1 ) return -1;
+
     int i_len = strlen( *ppsz_dest ) + strlen( psz_tmp ) + 1;
     char *psz_out = realloc( *ppsz_dest, i_len );
     if( !psz_out ) return -1;



More information about the vlc-commits mailing list