[vlc-commits] Add missing va_end (cid #1049744)
Rémi Duraffort
git at videolan.org
Tue Jul 23 10:19:41 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 22 19:41:20 2013 +0200| [2b1bed95b3e7844e63662bba6032ba876e6a3938] | committer: Jean-Baptiste Kempf
Add missing va_end (cid #1049744)
(cherry picked from commit 3a5100e88b4c0f5f8db340ed9859915ea24d479c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=2b1bed95b3e7844e63662bba6032ba876e6a3938
---
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