diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-02-15 01:51:43 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-02-15 01:51:43 (GMT) |
commit | c66ed457ef5318c56bf5109d0a4be30c6ccee866 (patch) | |
tree | 05802a51f49480c42d8c15d88157c8eb0559c109 /Objects/structseq.c | |
parent | c39cd783fb9277ca98816d375471717aff6c6a74 (diff) | |
download | cpython-c66ed457ef5318c56bf5109d0a4be30c6ccee866.zip cpython-c66ed457ef5318c56bf5109d0a4be30c6ccee866.tar.gz cpython-c66ed457ef5318c56bf5109d0a4be30c6ccee866.tar.bz2 |
Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
Diffstat (limited to 'Objects/structseq.c')
-rw-r--r-- | Objects/structseq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/structseq.c b/Objects/structseq.c index 58e15cb..dcc5457 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -201,6 +201,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds) res = (PyStructSequence*) PyStructSequence_New(type); if (res == NULL) { + Py_DECREF(arg); return NULL; } for (i = 0; i < len; ++i) { |