[evolution-patches] Re: Patch for #68264



On Fri, 2004-11-12 at 16:36 +0100, Diego Sevilla Ruiz wrote:
> Hi, Rodrigo:
> 
> 	Ooops, sorry, my fault.  I append a patch.  I discovered also
> two other memory leaks.
> 
now it looks ok, please commit, I would only change one thing:

> -       uri = e_uri_new (e_source_get_uri (t->source));
> +        uri_text = e_source_get_uri (t->source);
> +       uri = e_uri_new (uri_text);
>         if ((strcmp (uri->protocol, "http") &&
>              strcmp (uri->protocol, "webcal"))) {
>                 e_uri_free (uri);
> +                g_free (uri_text);
>                 return hidden;
>         }
>         e_uri_free (uri);
> +        g_free (uri_text);
> 
you can g_free (uri_text) right immediately after e_source_new, instead
of free'ing it in 2 places as you do. Change it if you want when
committing.
-- 
Rodrigo Moya <rodrigo novell com>




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