From 05816dd33396f92b7d9348a2acd18537ac18fa1e Mon Sep 17 00:00:00 2001 From: dequis Date: Sun, 22 Feb 2015 19:04:08 -0300 Subject: coverity: Fix some (harmless?) use-after-free with g_slist_remove() These were passing a pointer to a variable right after it was g_free()'d They are most likely harmless as g_slist_remove() probably just needs the pointer location, but fixing it anyway. --- protocols/msn/sb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'protocols/msn/sb.c') diff --git a/protocols/msn/sb.c b/protocols/msn/sb.c index d0412961..a9f3838f 100644 --- a/protocols/msn/sb.c +++ b/protocols/msn/sb.c @@ -518,11 +518,10 @@ static int msn_sb_command(struct msn_handler_data *handler, char **cmd, int num_ st = msn_sb_sendmessage(sb, m->text); } } + sb->msgq = g_slist_remove(sb->msgq, m); g_free(m->text); g_free(m->who); g_free(m); - - sb->msgq = g_slist_remove(sb->msgq, m); } msn_sb_start_keepalives(sb, FALSE); -- cgit v1.2.3