Commit 31180c45 authored by Francois Cartegnie's avatar Francois Cartegnie

access: cdda: fix resource leak

cid 403219
ioctl isn't released
parent 65169549
...@@ -147,18 +147,18 @@ static int Open( vlc_object_t *p_this ) ...@@ -147,18 +147,18 @@ static int Open( vlc_object_t *p_this )
if( psz_name[0] && psz_name[1] == ':' && if( psz_name[0] && psz_name[1] == ':' &&
psz_name[2] == '\\' && psz_name[3] == '\0' ) psz_name[2] = '\0'; psz_name[2] == '\\' && psz_name[3] == '\0' ) psz_name[2] = '\0';
#endif #endif
/* Set up p_access */
STANDARD_BLOCK_ACCESS_INIT
/* Open CDDA */ /* Open CDDA */
if( (vcddev = ioctl_Open( VLC_OBJECT(p_access), psz_name ) ) == NULL ) if( (vcddev = ioctl_Open( VLC_OBJECT(p_access), psz_name ) ) == NULL )
{ {
msg_Warn( p_access, "could not open %s", psz_name ); msg_Warn( p_access, "could not open %s", psz_name );
free( psz_name ); free( psz_name );
free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
free( psz_name ); free( psz_name );
/* Set up p_access */
STANDARD_BLOCK_ACCESS_INIT
p_sys->vcddev = vcddev; p_sys->vcddev = vcddev;
/* Do we play a single track ? */ /* Do we play a single track ? */
......
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