New submission from Xiang Zhang: _PyUnicodeWriter_Finish gets 2 problems now:
1. It has two same branches handling empty strings which is redundant. 2. It may leak the inner buffer object when resize_compact fails. When resize_compact fails, the buffer object is left untouched. Then the writer itself is freed and the buffer is leaked. ---------- components: Interpreter Core files: _PyUnicodeWriter_Finish.patch keywords: patch messages: 278434 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Fix redundant code and memory leak in _PyUnicodeWriter_Finish type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45048/_PyUnicodeWriter_Finish.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28408> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com