[Python-checkins] CVS: python/dist/src/Objects abstract.c,2.64,2.65
Tim Peters
tim_one@users.sourceforge.net
Fri, 04 May 2001 21:10:27 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv21829/python/dist/src/Objects
Modified Files:
abstract.c
Log Message:
Fix a tiny and unlikely memory leak. Was there before too, and actually
several of these turned up and got fixed during the iteration crusade.
Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.64
retrieving revision 2.65
diff -C2 -r2.64 -r2.65
*** abstract.c 2001/05/05 03:56:37 2.64
--- abstract.c 2001/05/05 04:10:25 2.65
***************
*** 1221,1226 ****
else
n += 100;
! if (_PyTuple_Resize(&result, n, 0) != 0)
goto Fail;
}
PyTuple_SET_ITEM(result, j, item);
--- 1221,1228 ----
else
n += 100;
! if (_PyTuple_Resize(&result, n, 0) != 0) {
! Py_DECREF(item);
goto Fail;
+ }
}
PyTuple_SET_ITEM(result, j, item);