Re: [PATCH] shoutcast: fix memory leak



On Mon, Sep 27, 2010 at 07:53:03PM +0200, Víctor Manuel Jáquez Leal wrote:
> Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez igalia com>
> ---
>  src/shoutcast/grl-shoutcast.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/src/shoutcast/grl-shoutcast.c b/src/shoutcast/grl-shoutcast.c
> index 7405d1a..f68d244 100644
> --- a/src/shoutcast/grl-shoutcast.c
> +++ b/src/shoutcast/grl-shoutcast.c
> @@ -493,7 +493,7 @@ read_done_cb (GObject *source_object,
>      g_error_free (error);
>      g_slice_free (OperationData, op_data);
>  
> -    return;
> +    goto end_func;
>    }
>  
>    cache = op_data->cache;
> @@ -507,6 +507,9 @@ read_done_cb (GObject *source_object,
>    } else {
>      g_free (content);
>    }
> +
> +end_func:
> +  g_object_unref (source_object);
>  }
>  
>  static gboolean

pushed

vmjl


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