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/yahoo/yahoo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols/yahoo') diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 8048ef8f..728803fb 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -732,9 +732,9 @@ void ext_yahoo_remove_handler(int id, int tag) while (l) { inp = l->data; if (inp->h == tag) { + byahoo_inputs = g_slist_remove(byahoo_inputs, inp); g_free(inp->d); g_free(inp); - byahoo_inputs = g_slist_remove(byahoo_inputs, inp); break; } l = l->next; -- cgit v1.2.3