aout: file: fix psz_name leak

This commit is contained in:
Johannes Kauffmann 2024-01-04 22:51:02 +01:00 committed by Steve Lhomme
parent c3c9840bc7
commit 02d87cc92b
1 changed files with 3 additions and 0 deletions

View File

@ -145,7 +145,10 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
/* Allocate structure */
aout_sys_t *p_sys = malloc( sizeof( aout_sys_t ) );
if( p_sys == NULL )
{
free( psz_name );
return VLC_ENOMEM;
}
p_aout->sys = p_sys;
if( !strcmp( psz_name, "-" ) )