Mercurial > pidgin
comparison libpurple/protocols/bonjour/jabber.c @ 22111:603d5325af4c
Prevent a crash caused by freed memory being accessed.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 14 Jan 2008 23:29:52 +0000 |
parents | cc0809ec0c85 |
children | 3225c99785b8 |
comparison
equal
deleted
inserted
replaced
22110:d8cc610bd388 | 22111:603d5325af4c |
---|---|
993 BonjourBuddy *bb = bconv->pb->proto_data; | 993 BonjourBuddy *bb = bconv->pb->proto_data; |
994 if (bb->conversation == bconv) | 994 if (bb->conversation == bconv) |
995 bb->conversation = NULL; | 995 bb->conversation = NULL; |
996 } | 996 } |
997 | 997 |
998 purple_timeout_add(0, _async_bonjour_jabber_close_conversation_cb, bconv); | 998 bconv->close_timeout = purple_timeout_add(0, _async_bonjour_jabber_close_conversation_cb, bconv); |
999 } | 999 } |
1000 | 1000 |
1001 void | 1001 void |
1002 bonjour_jabber_close_conversation(BonjourJabberConversation *bconv) | 1002 bonjour_jabber_close_conversation(BonjourJabberConversation *bconv) |
1003 { | 1003 { |
1051 g_free(ss); | 1051 g_free(ss); |
1052 } | 1052 } |
1053 | 1053 |
1054 if (bconv->context != NULL) | 1054 if (bconv->context != NULL) |
1055 bonjour_parser_setup(bconv); | 1055 bonjour_parser_setup(bconv); |
1056 | |
1057 if (bconv->close_timeout != 0) | |
1058 purple_timeout_remove(bconv->close_timeout); | |
1056 | 1059 |
1057 g_free(bconv->buddy_name); | 1060 g_free(bconv->buddy_name); |
1058 g_free(bconv->ip); | 1061 g_free(bconv->ip); |
1059 g_free(bconv); | 1062 g_free(bconv); |
1060 } | 1063 } |