[vlc-commits] access: cdda: fix resource leak
Francois Cartegnie
git at videolan.org
Wed Mar 12 18:48:18 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar 12 18:41:35 2014 +0100| [31180c4581cfcb87a16cca5fa5d619b167aab2d6] | committer: Francois Cartegnie
access: cdda: fix resource leak
cid 403219
ioctl isn't released
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31180c4581cfcb87a16cca5fa5d619b167aab2d6
---
modules/access/cdda.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 3d4961d..7581e78 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -147,18 +147,18 @@ static int Open( vlc_object_t *p_this )
if( psz_name[0] && psz_name[1] == ':' &&
psz_name[2] == '\\' && psz_name[3] == '\0' ) psz_name[2] = '\0';
#endif
+ /* Set up p_access */
+ STANDARD_BLOCK_ACCESS_INIT
/* Open CDDA */
if( (vcddev = ioctl_Open( VLC_OBJECT(p_access), psz_name ) ) == NULL )
{
msg_Warn( p_access, "could not open %s", psz_name );
free( psz_name );
+ free( p_sys );
return VLC_EGENERIC;
}
free( psz_name );
-
- /* Set up p_access */
- STANDARD_BLOCK_ACCESS_INIT
p_sys->vcddev = vcddev;
/* Do we play a single track ? */
More information about the vlc-commits
mailing list