1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-18 16:35:42 +00:00

Fix a bug that may cause a memory leak

This commit is contained in:
cuihaikuo
2017-06-19 16:24:16 +08:00
parent d16737b298
commit ab08ec51e2
3 changed files with 4 additions and 1 deletions

View File

@@ -2162,6 +2162,7 @@ seaf_repo_manager_get_repos_by_owner (SeafRepoManager *mgr,
if (repo != NULL)
ret = g_list_prepend (ret, repo);
}
g_list_free_full (repo_list, (GDestroyNotify)seaf_repo_unref);
return ret;
}

View File

@@ -46,7 +46,7 @@ check_repo_share_permission (SeafRepoManager *mgr,
CcnetGroup *group;
int group_id;
char *permission;
GString *sql = g_string_new ("");
GString *sql = NULL;
permission = seaf_share_manager_check_permission (seaf->share_mgr,
repo_id,
@@ -68,6 +68,7 @@ check_repo_share_permission (SeafRepoManager *mgr,
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 (");
for (p1 = groups; p1 != NULL; p1 = p1->next) {
group = p1->data;

View File

@@ -363,6 +363,7 @@ copy_template_files_recursive (SeafileSession *session,
}
g_free (sub_path);
}
g_dir_close (dir);
}
static void *