aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/bee_user.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-02-22 19:04:08 -0300
committerdequis <dx@dxzone.com.ar>2015-02-22 19:44:40 -0300
commit05816dd33396f92b7d9348a2acd18537ac18fa1e (patch)
tree980ad6ad4c5efc040d19ec09ed1cecc0104b17eb /protocols/bee_user.c
parent91f06e5535d3711da06533495b197c1b8e545f82 (diff)
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.
Diffstat (limited to 'protocols/bee_user.c')
-rw-r--r--protocols/bee_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/bee_user.c b/protocols/bee_user.c
index ea1be3db..0a211c71 100644
--- a/protocols/bee_user.c
+++ b/protocols/bee_user.c
@@ -67,6 +67,8 @@ int bee_user_free(bee_t *bee, bee_user_t *bu)
bu->ic->acc->prpl->buddy_data_free(bu);
}
+ bee->users = g_slist_remove(bee->users, bu);
+
g_free(bu->handle);
g_free(bu->fullname);
g_free(bu->nick);
@@ -74,8 +76,6 @@ int bee_user_free(bee_t *bee, bee_user_t *bu)
g_free(bu->status_msg);
g_free(bu);
- bee->users = g_slist_remove(bee->users, bu);
-
return 1;
}