Skip to content

Commit

Permalink
gh-129271: Fix reference leak with unicode writer in fast path in the…
Browse files Browse the repository at this point in the history
… json module (#129272)
  • Loading branch information
pablogsal authored Jan 25, 2025
1 parent e119526 commit 7a54a65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Modules/_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next
if (ret == NULL) {
goto bail;
}
PyUnicodeWriter_Discard(writer);
*next_end_ptr = next + 1;;
return ret;
}
Expand Down

0 comments on commit 7a54a65

Please sign in to comment.