Re: [PATCH] core: fix potential segfault in metadata_full_resolution_done_cb()



Yes, that is correct. Pushed.

El jue, 10-02-2011 a las 12:29 +0100, Guillaume Emont escribió:
> When introducing the cancel notification patch, it was assumed that the source
> passed to metadata_full_resolution_done_cb() is the original media source that
> triggered the full resolution. This is generally wrong, and can cause a
> segfault. The original source is available in cb_info->source.
> ---
>  src/grl-media-source.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/grl-media-source.c b/src/grl-media-source.c
> index f3ea5e0..7e6a057 100644
> --- a/src/grl-media-source.c
> +++ b/src/grl-media-source.c
> @@ -1273,7 +1273,7 @@ metadata_full_resolution_done_cb (GrlMetadataSource *source,
>    if (cb_info->pending_callbacks == 0) {
>      GError *_error = (GError *)error;
>      gboolean should_free_error = FALSE;
> -    if (operation_is_cancelled (GRL_MEDIA_SOURCE (source),
> +    if (operation_is_cancelled (cb_info->source,
>                                  cb_info->ctl_info->metadata_id)) {
>        /* if the plugin already set an error, we don't care because we're
>         * cancelled */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]