Mercurial > pidgin.yaz
changeset 8744:0f73e8204529
[gaim-migrate @ 9499]
"This patch fixes some memory leaks and also fixes the
title for the contact info dialog -- no longer using
"Title" :)" --Mike Stoddard
(16:51:04) Sean: Mike Stoddard is the Novell guy who wrote it. Accept any
patches from him
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 21 Apr 2004 21:01:42 +0000 |
parents | fb48b9472ea5 |
children | 6c0fae7a4f1a |
files | src/protocols/novell/nmuser.c src/protocols/novell/novell.c |
diffstat | 2 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/novell/nmuser.c Wed Apr 21 15:33:50 2004 +0000 +++ b/src/protocols/novell/nmuser.c Wed Apr 21 21:01:42 2004 +0000 @@ -1274,11 +1274,17 @@ const char * nm_lookup_dn(NMUser * user, const char *display_id) { + const char *dn; + char *lower; + if (user == NULL || display_id == NULL) return NULL; - return (const char *) g_hash_table_lookup(user->display_id_to_dn, - g_utf8_strdown(display_id, -1)); + lower = g_utf8_strdown(display_id, -1); + dn = g_hash_table_lookup(user->display_id_to_dn, lower); + g_free(lower); + + return dn; } NMFolder * @@ -1407,7 +1413,7 @@ user->user_record = nm_create_user_record_from_fields(fields); /* Save the users fields */ - user->fields = fields; + user->fields = nm_copy_field_array(fields); } else if (strcmp("setstatus", cmd) == 0) { @@ -1437,8 +1443,6 @@ } else if (strcmp("joinconf", cmd) == 0) { GSList *list = NULL, *node; - nm_print_fields(fields); - conf = nm_request_get_data(request); locate = nm_locate_field(NM_A_FA_CONTACT_LIST, fields); @@ -1608,6 +1612,9 @@ } } + if (fields) + nm_free_fields(&fields); + return rc; }
--- a/src/protocols/novell/novell.c Wed Apr 21 15:33:50 2004 +0000 +++ b/src/protocols/novell/novell.c Wed Apr 21 21:01:42 2004 +0000 @@ -1013,8 +1013,7 @@ } } - /* XXX - Um, we're using "Title" as the title? */ - gaim_notify_formatted(NULL, "Title", _("User Properties"), + gaim_notify_formatted(NULL, NULL, _("User Properties"), NULL, info_text->str, NULL, NULL); g_string_free(info_text, TRUE); @@ -1850,6 +1849,9 @@ g_free(str); } + if (message) + nm_release_message(message); + return -1; }