[vlc-devel] [PATCH 1/4] lib: media_player: release old media earlier
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Fri Sep 18 10:14:55 CEST 2020
On Fri, Sep 18, 2020, at 10:10 AM, Thomas Guillem wrote:
>
>
> On Fri, Sep 18, 2020, at 10:01, Hugo Beauzée-Luyssen wrote:
> > On Fri, Sep 18, 2020, at 9:42 AM, Thomas Guillem wrote:
> > > md or mp->p_md is not used after. No rick of race since mp->p_md is
> > Risk*
> >
> > > always written with the player lock held.
> > >
> > > This fixes a potential null-dereference if the media was already set to
> > > null and release by the user via libvlc_media_player_set_media().
> >
> > Given than libvlc_media_release is checking for NULL media, I don't
> > understand the potential null-deref
>
> Indeed, but it's not usual having a _release() function checking for
> pointer nullity.
>
That's fair. I guess it makes more sense to release it when we know there's something to release. The commit message probably should be updated though
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list