aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjgeboski <jgeboski@gmail.com>2015-01-16 16:50:25 -0300
committerdequis <dx@dxzone.com.ar>2015-01-16 16:50:25 -0300
commit664bac38fcdf6889d3ceb29b73a0c3a4e27820ce (patch)
tree837226825970f2d8a98e1afe4e3f15fd6ec42c90
parentecbd22a87ca7bc2675e9368445d193c6c81bf3c1 (diff)
irc-im: fixed invalid memory reading on chat leave
When a chat is left, prpl->chat_leave() is invoked, which is suppose to free the groupchat. Since the data is now freed, or suppose to have been freed, attempting to modify the data will result in bad things. This simply removes an assignment operation, which was unneeded due to the memory already being freed.
-rw-r--r--irc_im.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/irc_im.c b/irc_im.c
index c9f0efbc..0fa15a12 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -910,10 +910,8 @@ static gboolean bee_irc_channel_chat_part( irc_channel_t *ic, const char *msg )
if( c && c->ic->acc->prpl->chat_leave )
c->ic->acc->prpl->chat_leave( c );
- /* Remove references in both directions now. We don't need each other anymore. */
+ /* Remove the reference. We don't need it anymore. */
ic->data = NULL;
- if( c )
- c->ui_data = NULL;
return TRUE;
}