Re: [evolution-patches] patch to fix problems with folder name (camel-groupwise)
- From: Not Zed <notzed ximian com>
- To: Jain Vivek <jvivek novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] patch to fix problems with folder name (camel-groupwise)
- Date: Tue, 12 Jul 2005 09:02:28 +0800
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]