[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9d618cebfc21 by Serhiy Storchaka in branch '3.6':
Issue #28408: Fixed a leak and remove redundant code in 
_PyUnicodeWriter_Finish().
https://hg.python.org/cpython/rev/9d618cebfc21

New changeset 24c3f997bd1a by Serhiy Storchaka in branch 'default':
Issue #28408: Fixed a leak and remove redundant code in 
_PyUnicodeWriter_Finish().
https://hg.python.org/cpython/rev/24c3f997bd1a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

3.5 is free from both problems. They were introduced in f33433d9c163.

--
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-10 Thread Xiang Zhang

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com