# HG changeset patch # User Elliott Sales de Andrade # Date 1310622850 0 # Node ID 462c19eb31d8613579c26ffdbf5ce8490798da9d # Parent 7d08ac0415881fb3c96c84c7da47deeb632f6528 Remove duplicate calls to msn_slpmsg_set_slplink. This function is already called when a slpmsg is created, and calling it again will place the slpmsg on the slplink list an extra time. If the slpmsg is freed, then the first entry is removed, but the second remains, and can cause crashes due to invalid memory accesses. Fixes #14307. diff -r 7d08ac041588 -r 462c19eb31d8 ChangeLog --- a/ChangeLog Tue Jul 12 19:49:44 2011 +0000 +++ b/ChangeLog Thu Jul 14 05:54:10 2011 +0000 @@ -13,6 +13,9 @@ * Better status message handling. (Tomasz Wasilczyk) (#14314) * Merged two buddy blocking methods. (Tomasz Wasilczyk) (#5303) + MSN: + * Fix seemingly random crashing. (#14307) + XMPP: * Do not generate malformed XML ("") when setting an empty mood. (#14342) diff -r 7d08ac041588 -r 462c19eb31d8 libpurple/protocols/msn/slp.c --- a/libpurple/protocols/msn/slp.c Tue Jul 12 19:49:44 2011 +0000 +++ b/libpurple/protocols/msn/slp.c Thu Jul 14 05:54:10 2011 +0000 @@ -284,7 +284,6 @@ purple_xfer_unref(xfer); slpmsg = msn_slpmsg_file_new(slpcall, purple_xfer_get_size(xfer)); - msn_slpmsg_set_slplink(slpmsg, slpcall->slplink); msn_slplink_send_slpmsg(slpcall->slplink, slpmsg); } diff -r 7d08ac041588 -r 462c19eb31d8 libpurple/protocols/msn/slpcall.c --- a/libpurple/protocols/msn/slpcall.c Tue Jul 12 19:49:44 2011 +0000 +++ b/libpurple/protocols/msn/slpcall.c Thu Jul 14 05:54:10 2011 +0000 @@ -490,12 +490,10 @@ if (img != NULL) { /* DATA PREP */ slpmsg = msn_slpmsg_dataprep_new(slpcall); - msn_slpmsg_set_slplink(slpmsg, slplink); msn_slplink_queue_slpmsg(slplink, slpmsg); /* DATA */ slpmsg = msn_slpmsg_obj_new(slpcall, img); - msn_slpmsg_set_slplink(slpmsg, slplink); msn_slplink_queue_slpmsg(slplink, slpmsg); purple_imgstore_unref(img);