[Python-Dev] Fix for Lib/test/leakers/test_gestalt.py (original) (raw)
Thomas Heller theller at python.net
Mon Jul 10 18:07:50 CEST 2006
- Previous message: [Python-Dev] TRUNK FREEZE for 2.5b2, tomorrow Tuesday 11th, 00:00 UTC
- Next message: [Python-Dev] Fix for Lib/test/leakers/test_gestalt.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:
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; }
Thomas
- Previous message: [Python-Dev] TRUNK FREEZE for 2.5b2, tomorrow Tuesday 11th, 00:00 UTC
- Next message: [Python-Dev] Fix for Lib/test/leakers/test_gestalt.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]