https://hg.python.org/cpython/rev/8dfbaa2e8d26 changeset: 94351:8dfbaa2e8d26 branch: 3.4 parent: 94349:747855f29b9d user: Serhiy Storchaka <storchaka at gmail.com> date: Wed Jan 28 17:10:48 2015 +0200 summary: Fixed memory leak in marshal. files: Python/marshal.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Python/marshal.c b/Python/marshal.c --- a/Python/marshal.c +++ b/Python/marshal.c @@ -1522,8 +1522,10 @@ wf.depth = 0; wf.version = version; if (version >= 3) { - if ((wf.refs = PyDict_New()) == NULL) + if ((wf.refs = PyDict_New()) == NULL) { + Py_DECREF(wf.str); return NULL; + } } else wf.refs = NULL; w_object(x, &wf); -- Repository URL: https://hg.python.org/cpython