vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Apr 10 15:45:45 2017 +0200| [038cd29831604ce39346ddd1b01b888fb38824b0] | committer: Francois Cartegnie
demux: flac: replace xmalloc > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=038cd29831604ce39346ddd1b01b888fb38824b0 --- modules/demux/flac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/demux/flac.c b/modules/demux/flac.c index 2332bf151c..3da7c94d70 100644 --- a/modules/demux/flac.c +++ b/modules/demux/flac.c @@ -548,8 +548,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) if( p_sys->i_attachments <= 0 ) return VLC_EGENERIC; + *ppp_attach = malloc( sizeof(input_attachment_t*) * p_sys->i_attachments ); + if( !*ppp_attach ) + return VLC_EGENERIC; *pi_int = p_sys->i_attachments; - *ppp_attach = xmalloc( sizeof(input_attachment_t*) * p_sys->i_attachments ); for( int i = 0; i < p_sys->i_attachments; i++ ) (*ppp_attach)[i] = vlc_input_attachment_Duplicate( p_sys->attachments[i] ); return VLC_SUCCESS; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
