[vlc-commits] [Git][videolan/vlc][master] 3 commits: access: cdrom: fix potential leak on error
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu May 21 07:24:34 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
054b28e0 by François Cartegnie at 2026-05-21T07:14:15+00:00
access: cdrom: fix potential leak on error
- - - - -
e1e276ea by François Cartegnie at 2026-05-21T07:14:15+00:00
access: cdrom: fix leak
- - - - -
3626851e by François Cartegnie at 2026-05-21T07:14:15+00:00
access: cdrom: use dedicated struct reset on error
- - - - -
1 changed file:
- modules/access/vcd/cdrom.c
Changes:
=====================================
modules/access/vcd/cdrom.c
=====================================
@@ -408,7 +408,8 @@ vcddev_toc_t * ioctl_GetTOC( vlc_object_t *p_this, const vcddev_t *p_vcddev )
if( rc )
{
msg_Err( p_this, "could not read TOCHDR" );
- return 0;
+ vcddev_toc_Free( p_toc );
+ return NULL;
}
p_toc->i_tracks = tochdr.last_track - tochdr.first_track + 1;
@@ -511,6 +512,7 @@ vcddev_toc_t * ioctl_GetTOC( vlc_object_t *p_this, const vcddev_t *p_vcddev )
p_toc->p_sectors[ i ].i_lba = ntohl( toc_entries.data[i].addr.lba );
#endif
}
+ free( toc_entries.data );
#else
struct cdrom_tochdr tochdr;
struct cdrom_tocentry tocent;
@@ -964,8 +966,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
goto end;
error:
- free( p_toc->p_sectors );
- memset( p_toc, 0, sizeof(*p_toc) );
+ vcddev_toc_Reset( p_toc );
end:
if( cuefile ) fclose( cuefile );
free( psz_cuefile );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f21e5d43314c9350b52435728191339ee4e60a4...3626851e2cb99d7a313af7bf6cc267079cd5d244
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f21e5d43314c9350b52435728191339ee4e60a4...3626851e2cb99d7a313af7bf6cc267079cd5d244
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list