mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-19 10:03:40 +00:00
Fix a bug that may cause a memory leak
This commit is contained in:
@@ -2162,6 +2162,7 @@ seaf_repo_manager_get_repos_by_owner (SeafRepoManager *mgr,
|
|||||||
if (repo != NULL)
|
if (repo != NULL)
|
||||||
ret = g_list_prepend (ret, repo);
|
ret = g_list_prepend (ret, repo);
|
||||||
}
|
}
|
||||||
|
g_list_free_full (repo_list, (GDestroyNotify)seaf_repo_unref);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ check_repo_share_permission (SeafRepoManager *mgr,
|
|||||||
CcnetGroup *group;
|
CcnetGroup *group;
|
||||||
int group_id;
|
int group_id;
|
||||||
char *permission;
|
char *permission;
|
||||||
GString *sql = g_string_new ("");
|
GString *sql = NULL;
|
||||||
|
|
||||||
permission = seaf_share_manager_check_permission (seaf->share_mgr,
|
permission = seaf_share_manager_check_permission (seaf->share_mgr,
|
||||||
repo_id,
|
repo_id,
|
||||||
@@ -68,6 +68,7 @@ check_repo_share_permission (SeafRepoManager *mgr,
|
|||||||
|
|
||||||
ccnet_rpc_client_free (rpc_client);
|
ccnet_rpc_client_free (rpc_client);
|
||||||
|
|
||||||
|
sql = g_string_new ("");
|
||||||
g_string_printf (sql, "SELECT permission FROM RepoGroup WHERE repo_id = ? AND group_id IN (");
|
g_string_printf (sql, "SELECT permission FROM RepoGroup WHERE repo_id = ? AND group_id IN (");
|
||||||
for (p1 = groups; p1 != NULL; p1 = p1->next) {
|
for (p1 = groups; p1 != NULL; p1 = p1->next) {
|
||||||
group = p1->data;
|
group = p1->data;
|
||||||
|
@@ -363,6 +363,7 @@ copy_template_files_recursive (SeafileSession *session,
|
|||||||
}
|
}
|
||||||
g_free (sub_path);
|
g_free (sub_path);
|
||||||
}
|
}
|
||||||
|
g_dir_close (dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
Reference in New Issue
Block a user