Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 21df71a + 8aa8c47 commit cbcbfdfCopy full SHA for cbcbfdf
1 file changed
Python/codecs.c
@@ -890,8 +890,10 @@ PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
890
ressize += 1+1+2;
891
}
892
res = PyUnicode_New(ressize, 127);
893
- if (res==NULL)
+ if (res == NULL) {
894
+ Py_DECREF(object);
895
return NULL;
896
+ }
897
for (i = start, outp = PyUnicode_1BYTE_DATA(res);
898
i < end; ++i) {
899
c = PyUnicode_READ_CHAR(object, i);
0 commit comments