New submission from Christian Heimes: Unpickler_set_memo() has a memory leak when it is called with an empty dictionariy as argument
- PyDict_Check(obj) is true - PyDict_Size(obj) returns 0 - _Unpickler_NewMemo(new_memo_size) calls PyMem_MALLOC(0) - PyMem_MALLOC(0) returns a valid pointer although 0 bytes have been requested - later on an error occurs: goto exit - because new_memo_size == 0, PyMem_FREE(new_memo) is never executed CID 983308 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "new_memo" going out of scope leaks the storage it points to. ---------- components: Extension Modules messages: 192079 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Memory leak in _pickle.c:Unpickler_set_memo() type: resource usage versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18333> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com