summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-06-04 21:46:16 (GMT)
committerGeorg Brandl <georg@python.org>2006-06-04 21:46:16 (GMT)
commit9f167606665c186179bf362d4227e722731cd1b9 (patch)
tree1ab8469f32eba313583f23ed89babdce88040d2f /Objects
parent3f767795f6784ca6bf797b055be67fce5bf2fa06 (diff)
downloadcpython-9f167606665c186179bf362d4227e722731cd1b9.zip
cpython-9f167606665c186179bf362d4227e722731cd1b9.tar.gz
cpython-9f167606665c186179bf362d4227e722731cd1b9.tar.bz2
Repair refleaks in unicodeobject.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c3
1 files changed, 3 insertions, 0 deletions
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;
}