Skip to content

Commit

Permalink
Fix parse file access user error (#714)
Browse files Browse the repository at this point in the history
Co-authored-by: 杨赫然 <[email protected]>
  • Loading branch information
feiniks and 杨赫然 authored Nov 9, 2024
1 parent ed6a292 commit b1e7323
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/http-tx-mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit b1e7323

Please sign in to comment.