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



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->parts, g_strdup (uid), subparts);

That uid is string-copied. So either the hashtable needs a freeup
function or the string should not be copied or .. this is wrong.

Because I don't know how important the string copying is, what do you
guys think we should do here?


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






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