[Python-checkins] python/dist/src/Python exceptions.c,1.46,1.47

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Aug 14 14:59:09 EDT 2003


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

Modified Files:
	exceptions.c 
Log Message:
Fix refcount leak in the UnicodeError constructor:
When parsing the constructor arguments failed, a
reference to the argument tuple was leaked.


Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** exceptions.c	12 Aug 2003 17:34:49 -0000	1.46
--- exceptions.c	14 Aug 2003 20:59:07 -0000	1.47
***************
*** 1192,1196 ****
  	&PyInt_Type, &end,
  	&PyString_Type, &reason))
! 	return NULL;
  
      if (PyObject_SetAttrString(self, "args", args))
--- 1192,1196 ----
  	&PyInt_Type, &end,
  	&PyString_Type, &reason))
! 	goto finally;
  
      if (PyObject_SetAttrString(self, "args", args))





More information about the Python-checkins mailing list