[vlc-devel] [PATCH] player: fix null-deref with corks callbacks

Alexandre Janniaux ajanni at videolabs.io
Thu Mar 19 14:17:40 CET 2020


Hi,

LGTM, thanks for the fix,

Regards,
--
Alexandre Janniaux
Videolabs

On Thu, Mar 19, 2020 at 02:14:24PM +0100, Thomas Guillem wrote:
> ---
>  src/player/player.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/player/player.c b/src/player/player.c
> index 38c9b5aa57..a1a39a28f5 100644
> --- a/src/player/player.c
> +++ b/src/player/player.c
> @@ -1911,7 +1911,7 @@ vlc_player_Delete(vlc_player_t *player)
>      vlc_player_DestroyTimer(player);
>
>      vlc_player_aout_DelCallbacks(player);
> -    var_DelCallback(player, "corks", vlc_player_CorkCallback, NULL);
> +    var_DelCallback(player, "corks", vlc_player_CorkCallback, player);
>
>      input_resource_Release(player->resource);
>      if (player->renderer)
> @@ -2005,7 +2005,7 @@ vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type,
>          vlc_player_aout_AddCallbacks(player);
>          input_resource_PutAout(player->resource, aout);
>      }
> -    var_AddCallback(player, "corks", vlc_player_CorkCallback, NULL);
> +    var_AddCallback(player, "corks", vlc_player_CorkCallback, player);
>
>      player->deleting = false;
>      vlc_player_InitLocks(player, lock_type);
> @@ -2023,7 +2023,7 @@ vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type,
>  error:
>      if (aout)
>          vlc_player_aout_DelCallbacks(player);
> -    var_DelCallback(player, "corks", vlc_player_CorkCallback, NULL);
> +    var_DelCallback(player, "corks", vlc_player_CorkCallback, player);
>      if (player->resource)
>          input_resource_Release(player->resource);
>
> --
> 2.20.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list