Anonymous avatar Anonymous committed ea2f464

rect leak

Comments (0)

Files changed (4)

 
 - David Clark for packaging and help with releases
 
+- Francis Irving for Debian packaging
+
+- Niki Spahiev for bugfixes
+
 - Jan Ekhol, Ray Kelm, and Peter Nicolai for initial design advise
 
 - Python and the team behind it, headed by Guido van Rossum
 # BREAK = change breaks existing code
 # BUG   = fixed a bug that was crashing
 
+Mar 16, 2001
+	Fixed memory leak in Rect constructor
+	Fixed improper exception in update.display
+
 Feb 15, 2001
 	calling Sound.play() will make sure the channel
 		that gets selected has volume set to full
 	else
 	{
 		gr = GameRect_FromObject(arg, &temp);
-		if(gr && gr != &temp)
+		if(!gr)
+			PyErr_Clear();
+		else if(gr != &temp)
 		{
 			memcpy(&temp, gr, sizeof(temp));
 			gr = &temp;
 				{Py_XDECREF(sub); return NULL;}
 			if(!ShortFromObjIndex(sub, 0, &val)) {Py_DECREF(sub); return NULL;} temp->x = val;
 			if(!ShortFromObjIndex(sub, 1, &val)) {Py_DECREF(sub); return NULL;} temp->y = val;
+			Py_DECREF(sub);
 			sub = PySequence_GetItem(obj, 1);
 			if(!sub || !PySequence_Check(sub) || PySequence_Length(sub)!=2)
 				{Py_XDECREF(sub); return NULL;}
 			if(!ShortFromObjIndex(sub, 0, &val)) {Py_DECREF(sub); return NULL;} temp->w = val;
 			if(!ShortFromObjIndex(sub, 1, &val)) {Py_DECREF(sub); return NULL;} temp->h = val;
+			Py_DECREF(sub);
 			return temp;
 		}
 		if(PyTuple_Check(obj) && PyTuple_Size(obj) == 1) /*looks like an arg?*/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.