[Python-3000] Two new test failures (one OSX PPC only)
Christian Heimes
lists at cheimes.de
Fri Aug 17 14:44:55 CEST 2007
Guido van Rossum wrote:
> There's still one leak that Neal would like to see fixed, in
> test_zipimport. Instructions to reproduce: in a *debug* build, run
> this command:
>
> ./python Lib/test/regrtest.py -R1:1: test_zipimport
>
> This reports 29 leaked references.
>
Err, this patch is using a better name for the data. *blush*
Index: Modules/zipimport.c
===================================================================
--- Modules/zipimport.c (Revision 57115)
+++ Modules/zipimport.c (Arbeitskopie)
@@ -851,10 +851,11 @@
}
buf[data_size] = '\0';
- if (compress == 0) { /* data is not compressed */
- raw_data = PyBytes_FromStringAndSize(buf, data_size);
- return raw_data;
- }
+ if (compress == 0) { /* data is not compressed */
+ data = PyBytes_FromStringAndSize(buf, data_size);
+ Py_DECREF(raw_data);
+ return data;
+ }
/* Decompress with zlib */
decompress = get_decompress_func();
Christian
More information about the Python-3000
mailing list