From a56c1cf8dc7f5cd6ac6165ce0e605d66c9c0fa47 Mon Sep 17 00:00:00 2001 From: Jochen De Smet Date: Sat, 10 Oct 2009 00:32:40 -0400 Subject: [PATCH] No need to strdup old_name; fixes leak since it was never freed Check s_group instead of group; debug message below doesn't make sense otherwise --- src/sipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sipe.c b/src/sipe.c index 8cfbb7d3..ed5b261c 100644 --- a/src/sipe.c +++ b/src/sipe.c @@ -1902,8 +1902,8 @@ sipe_rename_group(PurpleConnection *gc, SIPE_UNUSED_PARAMETER GList *moved_buddies) { struct sipe_account_data *sip = (struct sipe_account_data *)gc->proto_data; - struct sipe_group * s_group = sipe_group_find_by_name(sip, g_strdup(old_name)); - if (group) { + struct sipe_group * s_group = sipe_group_find_by_name(sip, old_name); + if (s_group) { sipe_group_rename(sip, s_group, group->name); } else { purple_debug_info("sipe", "Cannot find group %s to rename\n", old_name); -- 2.11.4.GIT