https://github.com/python/cpython/commit/7a54a653b718a70c96755f6fc39f01f5c582558a
commit: 7a54a653b718a70c96755f6fc39f01f5c582558a
branch: main
author: Pablo Galindo Salgado <[email protected]>
committer: vstinner <[email protected]>
date: 2025-01-25T17:54:20+01:00
summary:
gh-129271: Fix reference leak with unicode writer in fast path in the json
module (#129272)
files:
M Modules/_json.c
diff --git a/Modules/_json.c b/Modules/_json.c
index 091bcbfdced42b..31a5e935e13ad9 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -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;
}
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]