1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-04-28 03:20:10 +00:00

Fix parse file access user error (#714)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks 2024-11-09 14:43:25 +08:00 committed by GitHub
parent ed6a292061
commit b1e7323647
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -664,6 +664,7 @@ parse_file_access_info (const char *rsp_content, int rsp_size)
json_t *object;
json_error_t jerror;
const char *user = NULL;
char *ret = NULL;
object = json_loadb (rsp_content, rsp_size, 0, &jerror);
if (!object) {
@ -676,11 +677,12 @@ parse_file_access_info (const char *rsp_content, int rsp_size)
seaf_warning ("Failed to find user in json when check file access in Seahub.\n");
goto out;
}
ret = g_strdup (user);
out:
json_decref (object);
return g_strdup (user);
return ret;
}
int