Commit 7e66b53b authored by Rémi Duraffort's avatar Rémi Duraffort

oss: don't forget some "close".

parent f1458f0d
...@@ -321,6 +321,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -321,6 +321,7 @@ static int Open( vlc_object_t *p_this )
if ( var_Get( p_aout, "audio-device", &val ) < 0 ) if ( var_Get( p_aout, "audio-device", &val ) < 0 )
{ {
/* Probe() has failed. */ /* Probe() has failed. */
close( p_sys->i_fd );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -359,12 +360,12 @@ static int Open( vlc_object_t *p_this ) ...@@ -359,12 +360,12 @@ static int Open( vlc_object_t *p_this )
{ {
/* This should not happen ! */ /* This should not happen ! */
msg_Err( p_aout, "internal: can't find audio-device (%i)", val.i_int ); msg_Err( p_aout, "internal: can't find audio-device (%i)", val.i_int );
close( p_sys->i_fd );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
val.b_bool = true; var_SetBool( p_aout, "intf-change", true );
var_Set( p_aout, "intf-change", val );
/* Reset the DSP device */ /* Reset the DSP device */
if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 ) if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment