[Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.109,2.110

Tim Peters tim_one@users.sourceforge.net
Mon, 10 Sep 2001 19:00:52 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv27419

Modified Files:
	unicodeobject.c 
Log Message:
PyUnicode_FromEncodedObject():  Repair memory leak in an error case.


Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.109
retrieving revision 2.110
diff -C2 -d -r2.109 -r2.110
*** unicodeobject.c	2001/08/30 03:12:59	2.109
--- unicodeobject.c	2001/09/11 02:00:50	2.110
***************
*** 425,430 ****
      }
      if (PyUnicode_Check(obj)) {
- 	Py_INCREF(obj);
- 	v = obj;
  	if (encoding) {
  	    PyErr_SetString(PyExc_TypeError,
--- 425,428 ----
***************
*** 432,435 ****
--- 430,435 ----
  	    return NULL;
  	}
+ 	Py_INCREF(obj);
+ 	v = obj;
  	goto done;
      }