From 9f167606665c186179bf362d4227e722731cd1b9 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 4 Jun 2006 21:46:16 +0000 Subject: Repair refleaks in unicodeobject. --- Objects/unicodeobject.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index eb5bdd8..970e69f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; } -- cgit v0.12