Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
fix: invalid write
Browse files Browse the repository at this point in the history
  • Loading branch information
Antares0982 committed Jun 5, 2024
1 parent bc7b937 commit d369fc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/yyjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -7377,8 +7377,9 @@ static_inline PyObject *read_root_pretty(u8 *temp_buf,
// doc->val_read = (usize)((val - val_hdr)) - hdr_len + 1;
// doc->str_pool = has_read_flag(INSITU) ? NULL : (char *)hdr;
// return doc;
PyObject* ret = val_hdr->val;
release_buf();
return val_hdr->val;
return ret;

fail_string:
return_err(cur, INVALID_STRING, msg);
Expand Down

0 comments on commit d369fc5

Please sign in to comment.