A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-July/067212.html below:

[Python-Dev] Fix for Lib/test/leakers/test_gestalt.py

[Python-Dev] Fix for Lib/test/leakers/test_gestalt.py [Python-Dev] Fix for Lib/test/leakers/test_gestalt.pyThomas Heller theller at python.net
Mon Jul 10 23:51:28 CEST 2006
Thomas Heller schrieb:
> I think this fixes the leak in Lib/test/leakers/test_gestalt.py.
> 
> Index: Python/mactoolboxglue.c
> ===================================================================
> --- Python/mactoolboxglue.c	(revision 50522)
> +++ Python/mactoolboxglue.c	(working copy)
> @@ -60,8 +60,9 @@
>  			strncpy(buf, input, sizeof(buf) - 1);
>  			buf[sizeof(buf) - 1] = '\0';
>  		}
> +		Py_DECREF(rv);
>  	}
> -	
> +	Py_XDECREF(m);
>  	return buf;
>  }
>  
> 
> I'm less sure about this one, but it looks like the DECREF
> is also required:

(Here's the patch that I *really* meant)

Index: Mac/Modules/macosmodule.c
===================================================================
--- Mac/Modules/macosmodule.c	(Revision 50515)
+++ Mac/Modules/macosmodule.c	(Arbeitskopie)
@@ -375,6 +375,7 @@
 				/* And try again... */
 				h = GetResource('Estr', err);
 			}
+			Py_DECREF(m);
 		}
 	}
 	/*

Thomas

More information about the Python-Dev mailing list

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