A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-October/030284.html below:

[Python-checkins] python/dist/src/Objects typeobject.c,2.126.4.25,2.126.4.26

[Python-checkins] python/dist/src/Objects typeobject.c,2.126.4.25,2.126.4.26gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Fri, 18 Oct 2002 06:42:24 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv6416

Modified Files:
      Tag: release22-maint
	typeobject.c 
Log Message:
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.


Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.126.4.25
retrieving revision 2.126.4.26
diff -C2 -d -r2.126.4.25 -r2.126.4.26
*** typeobject.c	11 Oct 2002 00:22:22 -0000	2.126.4.25
--- typeobject.c	18 Oct 2002 13:42:21 -0000	2.126.4.26
***************
*** 2250,2255 ****
  		ref = PyList_GET_ITEM(list, i);
  		assert(PyWeakref_CheckRef(ref));
! 		if (PyWeakref_GET_OBJECT(ref) == Py_None)
! 			return PyList_SetItem(list, i, new);
  	}
  	i = PyList_Append(list, new);
--- 2250,2258 ----
  		ref = PyList_GET_ITEM(list, i);
  		assert(PyWeakref_CheckRef(ref));
! 		if (PyWeakref_GET_OBJECT(ref) == Py_None) {
! 			i = PyList_SetItem(list, i, new);
! 			Py_DECREF(new);
! 			return i;
! 		}
  	}
  	i = PyList_Append(list, new);





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4