]> git.sesse.net Git - vlc/commitdiff
Fix vasprintf warning.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 13 Aug 2008 19:26:10 +0000 (12:26 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 13 Aug 2008 19:26:58 +0000 (12:26 -0700)
modules/access/ftp.c

index 7d874566ef85f3d797740efdd6babb455a3c7f71..c3cf70544f6e9ec511fc2b09408377da5d34ae06 100644 (file)
@@ -589,10 +589,13 @@ static int ftp_SendCommand( vlc_object_t *p_access, access_sys_t *p_sys,
     char         *psz_cmd;
 
     va_start( args, psz_fmt );
-    vasprintf( &psz_cmd, psz_fmt, args );
+    if( vasprintf( &psz_cmd, psz_fmt, args ) == -1 )
+        return VLC_EGENERIC;
+
     va_end( args );
 
     msg_Dbg( p_access, "ftp_SendCommand:\"%s\"", psz_cmd);
+
     if( net_Printf( VLC_OBJECT(p_access), p_sys->fd_cmd, NULL, "%s\r\n",
                     psz_cmd ) < 0 )
     {