[issue15900] Memory leak in PyUnicode_TranslateCharmap()

Christian Heimes report at bugs.python.org
Mon Sep 10 11:58:22 CEST 2012


New submission from Christian Heimes:

Objects/unicodeobject.c:PyUnicode_TranslateCharmap() leaks a reference to the variable unicode. PyUnicode_Translate() is also implemented around the helper function _PyUnicode_TranslateCharmap() but it properly decrefs the reference to the first argument.

PyUnicode_Translate() also has an obsolete onError goto label. The patch fixes the leak and simplifies PyUnicode_Translate().

CID 719686

----------
components: Interpreter Core
files: translate_leak.patch
keywords: 3.3regression, patch
messages: 170170
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Memory leak in PyUnicode_TranslateCharmap()
type: resource usage
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27164/translate_leak.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15900>
_______________________________________


More information about the Python-bugs-list mailing list