comparison libpurple/protocols/msn/slpcall.c @ 23677:331effbd1cc8

Re-arrange msn_slplink_destroy and msn_slp_call_destroy. Might help avoid use-after-free in slp.c got_emoticon and got_user_display.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 08 Aug 2008 04:47:50 +0000
parents 96e78c0fa32b
children e8f75e750260
comparison
equal deleted inserted replaced
23676:8552b19acbce 23677:331effbd1cc8
68 g_return_if_fail(slpcall != NULL); 68 g_return_if_fail(slpcall != NULL);
69 69
70 if (slpcall->timer) 70 if (slpcall->timer)
71 purple_timeout_remove(slpcall->timer); 71 purple_timeout_remove(slpcall->timer);
72 72
73 g_free(slpcall->id);
74 g_free(slpcall->branch);
75 g_free(slpcall->data_info);
76
77 for (e = slpcall->slplink->slp_msgs; e != NULL; ) 73 for (e = slpcall->slplink->slp_msgs; e != NULL; )
78 { 74 {
79 MsnSlpMessage *slpmsg = e->data; 75 MsnSlpMessage *slpmsg = e->data;
80 e = e->next; 76 e = e->next;
81 77
97 if (slpcall->end_cb != NULL) 93 if (slpcall->end_cb != NULL)
98 slpcall->end_cb(slpcall, session); 94 slpcall->end_cb(slpcall, session);
99 95
100 if (slpcall->xfer != NULL) 96 if (slpcall->xfer != NULL)
101 purple_xfer_unref(slpcall->xfer); 97 purple_xfer_unref(slpcall->xfer);
98
99 g_free(slpcall->id);
100 g_free(slpcall->branch);
101 g_free(slpcall->data_info);
102 102
103 g_free(slpcall); 103 g_free(slpcall);
104 } 104 }
105 105
106 void 106 void