Repair refleaks in unicodeobject.

This commit is contained in:
Georg Brandl 2006-06-04 21:46:16 +00:00
parent 3f767795f6
commit 9f16760666

View file

@ -3194,6 +3194,8 @@ PyUnicode_BuildEncodingMap(PyObject* string)
goto failed1;
if (PyDict_SetItem(result, key, value) == -1)
goto failed1;
Py_DECREF(key);
Py_DECREF(value);
}
return result;
failed1:
@ -3389,6 +3391,7 @@ charmapencode_result charmapencode_output(Py_UNICODE c, PyObject *mapping,
*outpos += repsize;
}
}
Py_DECREF(rep);
return enc_SUCCESS;
}