commit | 37784ba5c08aed9a3153eb5a37014e59ee3769fe | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Wed Feb 15 02:51:43 2012 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Wed Feb 15 02:51:43 2012 +0100 |
tree | 1f7126686104362766ce69b0261d2603448fd34c | |
parent | f5f1fe0cb5dedf37098622de318656003dc5230d [diff] [blame] |
Issue #13020: Fix a reference leak when allocating a structsequence object fails. Patch by Suman Saha.
diff --git a/Objects/structseq.c b/Objects/structseq.c index ef17f49..ac4f980 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c
@@ -129,6 +129,7 @@ res = (PyStructSequence*) PyStructSequence_New(type); if (res == NULL) { + Py_DECREF(arg); return NULL; } for (i = 0; i < len; ++i) {