Commit 547a5207 authored by Walter Dörwald's avatar Walter Dörwald

Fix refleak: decref inputobj after extracting the relavant info (the object

won't go away, as the exception object holds another reference).
parent c7578e56
...@@ -1323,6 +1323,9 @@ int unicode_decode_call_errorhandler(const char *errors, PyObject **errorHandler ...@@ -1323,6 +1323,9 @@ int unicode_decode_call_errorhandler(const char *errors, PyObject **errorHandler
*input = PyBytes_AS_STRING(inputobj); *input = PyBytes_AS_STRING(inputobj);
insize = PyBytes_GET_SIZE(inputobj); insize = PyBytes_GET_SIZE(inputobj);
*inend = *input + insize; *inend = *input + insize;
/* we can DECREF safely, as the exception has another reference,
so the object won't go away. */
Py_DECREF(inputobj);
if (newpos<0) if (newpos<0)
newpos = insize+newpos; newpos = insize+newpos;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment