mirror of
https://github.com/haiwen/ccnet-server.git
synced 2025-08-12 09:51:44 +00:00
Fix a bug of freeing wild pointer.
This commit is contained in:
parent
57253be4c1
commit
c2a1d1c7ca
@ -821,11 +821,13 @@ ccnet_group_manager_get_groups_by_user (CcnetGroupManager *mgr,
|
|||||||
get_group_paths_cb,
|
get_group_paths_cb,
|
||||||
paths, 0) < 0) {
|
paths, 0) < 0) {
|
||||||
g_list_free_full (ret, g_object_unref);
|
g_list_free_full (ret, g_object_unref);
|
||||||
|
ret = NULL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (g_strcmp0(paths->str, "") == 0) {
|
if (g_strcmp0(paths->str, "") == 0) {
|
||||||
ccnet_warning ("Failed to get groups path for user %s\n", user_name);
|
ccnet_warning ("Failed to get groups path for user %s\n", user_name);
|
||||||
g_list_free_full (ret, g_object_unref);
|
g_list_free_full (ret, g_object_unref);
|
||||||
|
ret = NULL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -837,6 +839,7 @@ ccnet_group_manager_get_groups_by_user (CcnetGroupManager *mgr,
|
|||||||
get_user_groups_cb,
|
get_user_groups_cb,
|
||||||
&ret, 0) < 0) {
|
&ret, 0) < 0) {
|
||||||
g_list_free_full (ret, g_object_unref);
|
g_list_free_full (ret, g_object_unref);
|
||||||
|
ret = NULL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user