From a021a7f95fc6a02eb74f00ef8adae93a84f3392c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Wed, 13 Aug 2008 12:26:10 -0700 Subject: [PATCH] Fix vasprintf warning. --- modules/access/ftp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/access/ftp.c b/modules/access/ftp.c index 7d874566ef..c3cf70544f 100644 --- a/modules/access/ftp.c +++ b/modules/access/ftp.c @@ -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 ) { -- 2.39.2