commit | f466793fcc6e2234f4843bd6a04625f1fac96132 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Sat Jun 28 20:04:25 2003 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Sat Jun 28 20:04:25 2003 +0000 |
tree | 63ffd3139c3298e98551826ab9b7e41d4be9d536 | |
parent | 6891cd3aa37ac3d27de5563849ef848eed1fe411 [diff] [blame] |
SF patch 703666: Several objects don't decref tmp on failure in subtype_new Submitted By: Christopher A. Craig Fillin some missing decrefs.
diff --git a/Objects/intobject.c b/Objects/intobject.c index 4b5dc55..a3df3ba 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c
@@ -958,8 +958,10 @@ } new = type->tp_alloc(type, 0); - if (new == NULL) + if (new == NULL) { + Py_DECREF(tmp); return NULL; + } ((PyIntObject *)new)->ob_ival = ival; Py_DECREF(tmp); return new;