Re: [Evolution-hackers] Memory leak in camel-imap-message-cache.c

2008-01-14 Thread Srinivasa Ragavan
On Mon, 2008-01-14 at 11:45 +0100, Philip Van Hoof wrote: > On Mon, 2008-01-14 at 16:02 +0530, Srinivasa Ragavan wrote: > > Look at the free_part function being called at > > g_hash_table_foreach (cache->parts, free_part, cache); > > > > It frees the key. > > Aha. Okay thanks for the clarificat

Re: [Evolution-hackers] Memory leak in camel-imap-message-cache.c

2008-01-14 Thread Philip Van Hoof
On Mon, 2008-01-14 at 16:02 +0530, Srinivasa Ragavan wrote: > Look at the free_part function being called at > g_hash_table_foreach (cache->parts, free_part, cache); > > It frees the key. Aha. Okay thanks for the clarification. I wonder, wouldn't it be better to use the standard infrastructure

Re: [Evolution-hackers] Memory leak in camel-imap-message-cache.c

2008-01-14 Thread Srinivasa Ragavan
Look at the free_part function being called at g_hash_table_foreach (cache->parts, free_part, cache); It frees the key. -Srini. On Mon, 2008-01-14 at 02:58 +0100, Philip Van Hoof wrote: > Hi there, > > The cache->parts = g_hash_table_new (g_str_hash, g_str_equal); of > camel-imap-message-cache

[Evolution-hackers] Memory leak in camel-imap-message-cache.c

2008-01-13 Thread Philip Van Hoof
Hi there, The cache->parts = g_hash_table_new (g_str_hash, g_str_equal); of camel-imap-message-cache.c does not free its keys (it's the default way of creating a hashtable, so there's no freeup function provided for the keys). Yet at (or around) line 118 we see this: g_hash_table_insert (cache-