[Python-checkins] python/dist/src/Python import.c,2.226,2.227

loewis at users.sourceforge.net loewis at users.sourceforge.net
Tue Mar 23 11:28:18 EST 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31567

Modified Files:
	import.c 
Log Message:
Decref all if ensure_fromlist fails. Fixes #876533.
Backported to 2.3.


Index: import.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/import.c,v
retrieving revision 2.226
retrieving revision 2.227
diff -C2 -d -r2.226 -r2.227
*** import.c	2 Jan 2004 23:25:32 -0000	2.226
--- import.c	23 Mar 2004 16:28:13 -0000	2.227
***************
*** 2105,2111 ****
  				PyErr_Clear();
  			else {
! 				if (!ensure_fromlist(mod, all, buf, buflen, 1))
! 					return 0;
  				Py_DECREF(all);
  			}
  			continue;
--- 2105,2112 ----
  				PyErr_Clear();
  			else {
! 				int ret = ensure_fromlist(mod, all, buf, buflen, 1);
  				Py_DECREF(all);
+ 				if (!ret)
+ 					return 0;
  			}
  			continue;




More information about the Python-checkins mailing list