Re: [evolution-patches] patch to fix problems with folder name (camel-groupwise)
- From: partha <sparthasarathi novell com>
- To: Vivek Jain <jvivek novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] patch to fix problems with folder name (camel-groupwise)
- Date: Tue, 19 Jul 2005 14:00:02 +0530
Looks ok.
And thanks for fixing all the leaks.
Cheers,
partha
On Fri, 2005-07-15 at 15:24 +0530, Vivek Jain wrote:
> Thanks for pointing that out. (Actually ya, I shouldn't have missed it)
> Here is the revised patch, which also addresses the memory leak issues
> as well as corrects some styling issues.
>
> Thanks,
> Vivek
> On Tue, 2005-07-12 at 09:02 +0800, Not Zed wrote:
> > This leaks memory:
> >
> > On Mon, 2005-07-11 at 00:31 -0600, Jain Vivek wrote:
> > > - }
> > > +
> > > + container_id = g_strdup (g_hash_table_lookup
> > > (priv->name_hash, g_strdup(folder_name))) ;
> > >
> >
> > This leaks memory:
> >
> > > + if (parent_name) {
> > > + if (strlen(parent_name) > 0)
> > > + fi->full_name =
> > > g_strconcat(parent_name,"/",g_strdup(folder_name), NULL) ;
> > >
> >
> > And surprise, so does this:
> >
> > > - } else
> > > + if (parent_name && (strlen(parent_name) > 0) )
> > > + parent_id = g_hash_table_lookup (priv->name_hash,
> > > g_strdup(parent_name)) ;
> > > + else
> > > parent_id = "" ;
> >
> > Sigh, and another one:
> >
> > > + g_hash_table_remove (priv->name_hash, g_strdup(old_name)) ;
> >
> >
> > Yes, it leaked it before your patch, but it should be obvious to spot
> > the problems when transcribing existing code.
> >
> >
> > _______________________________________________
> > evolution-patches mailing list
> > evolution-patches lists ximian com
> > http://lists.ximian.com/mailman/listinfo/evolution-patches
> _______________________________________________
> evolution-patches mailing list
> evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]