Re: Memory leak fixes in exchange connector and e-d-s

Jeffrey Stedfast <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Organization Novell, Inc.
Message-ID <[email protected]>
On Tue, 2006-02-07 at 20:20 +0530, Sushma Rai wrote:
> Index: evolution-exchange/calendar/e-cal-backend-exchange.c
> ===================================================================
> RCS file: /cvs/gnome/evolution-exchange/calendar/e-cal-backend-exchange.c,v
> retrieving revision 1.57
> diff -u -p -r1.57 e-cal-backend-exchange.c
> --- evolution-exchange/calendar/e-cal-backend-exchange.c        6 Feb 2006 08:32:50 -0000       1.57
> +++ evolution-exchange/calendar/e-cal-backend-exchange.c        7 Feb 2006 14:17:55 -0000
> @@ -1545,6 +1545,7 @@ get_attachment (ECalBackendExchange *cbe
>                                 g_free (attach_file);
>                                 d(printf ("attach file name : %s\n", attach_file_url));
>                                 list = g_slist_append (list, g_strdup (attach_file_url));
> +                               g_free (attach_file_url);

wouldn't it be simpler to do:

list = g_slist_append (list, attach_file_url);

that way there'd be no need for a g_free or a g_strdup call.

>  
>                                 camel_object_unref (stream);
>                         } 
-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
[email protected]  - www.novell.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.