changeset 14924:71c764f2b1a6

[gaim-migrate @ 17696] sf patch #1592081, from Stanislav Brabec "fix of possible crash (access memory after g_slist_remove())" committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 07 Nov 2006 17:52:01 +0000
parents 589c4aaa0435
children 8d9a473bbab9
files libgaim/protocols/novell/nmuser.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/novell/nmuser.c	Tue Nov 07 07:21:27 2006 +0000
+++ b/libgaim/protocols/novell/nmuser.c	Tue Nov 07 17:52:01 2006 +0000
@@ -1526,9 +1526,9 @@
 		for (node = list; node; node = node->next) {
 			if (nm_utf8_str_equal(nm_user_record_get_dn(user_record),
 								  (const char *) node->data)) {
+				g_free(node->data);
 				list = g_slist_remove(list, node->data);
 				nm_request_set_user_define(request, list);
-				g_free(node->data);
 				break;
 			}
 		}