[Python-checkins] python/dist/src/Modules posixmodule.c,2.283,2.284 _tkinter.c,1.148,1.149

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Tue, 11 Feb 2003 15:05:44 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv25791/Modules

Modified Files:
	posixmodule.c _tkinter.c 
Log Message:
Add more missing PyErr_NoMemory() after failled memory allocs

Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.283
retrieving revision 2.284
diff -C2 -d -r2.283 -r2.284
*** posixmodule.c	10 Feb 2003 03:10:43 -0000	2.283
--- posixmodule.c	11 Feb 2003 23:05:39 -0000	2.284
***************
*** 2252,2256 ****
  	if (argvlist == NULL) {
  		PyMem_Free(path);
! 		return NULL;
  	}
  	for (i = 0; i < argc; i++) {
--- 2252,2256 ----
  	if (argvlist == NULL) {
  		PyMem_Free(path);
! 		return PyErr_NoMemory();
  	}
  	for (i = 0; i < argc; i++) {
***************
*** 2481,2485 ****
  	if (argvlist == NULL) {
  		PyMem_Free(path);
! 		return NULL;
  	}
  	for (i = 0; i < argc; i++) {
--- 2481,2485 ----
  	if (argvlist == NULL) {
  		PyMem_Free(path);
! 		return PyErr_NoMemory();
  	}
  	for (i = 0; i < argc; i++) {

Index: _tkinter.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -C2 -d -r1.148 -r1.149
*** _tkinter.c	22 Jan 2003 09:17:38 -0000	1.148
--- _tkinter.c	11 Feb 2003 23:05:40 -0000	1.149
***************
*** 2051,2055 ****
  	data = PyMem_NEW(PythonCmd_ClientData, 1);
  	if (!data)
! 		return NULL;
  	Py_XINCREF(self);
  	Py_XINCREF(func);
--- 2051,2055 ----
  	data = PyMem_NEW(PythonCmd_ClientData, 1);
  	if (!data)
! 		return PyErr_NoMemory();
  	Py_XINCREF(self);
  	Py_XINCREF(func);