# HG changeset patch # User Stu Tomlinson # Date 1205371461 0 # Node ID 22fce0be8ed02f49d94d5d4e09faa244df810d01 # Parent 34b8d1107b063de5d5565fef024413b7f2b1183b Fix a memory leak diff -r 34b8d1107b06 -r 22fce0be8ed0 libpurple/plugins/joinpart.c --- a/libpurple/plugins/joinpart.c Wed Mar 12 01:38:51 2008 +0000 +++ b/libpurple/plugins/joinpart.c Thu Mar 13 01:24:21 2008 +0000 @@ -77,7 +77,7 @@ { PurpleConvChat *chat; int threshold; - struct joinpart_key *key; + struct joinpart_key key; time_t *last_said; g_return_val_if_fail(conv != NULL, FALSE); @@ -94,10 +94,9 @@ return FALSE; /* Only show the notice if the user has spoken recently. */ - key = g_new(struct joinpart_key, 1); - key->conv = conv; - key->user = g_strdup(name); - last_said = g_hash_table_lookup(users, key); + key.conv = conv; + key.user = (gchar *)name; + last_said = g_hash_table_lookup(users, &key); if (last_said != NULL) { int delay = purple_prefs_get_int(DELAY_PREF);