[XML-SIG] Re: sax parser leaks memory?

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 5 Dec 2000 01:04:47 +0100


> > on my windows box, this little script runs out of memory
> > within 30 seconds or so...
> 
> here's another example:

Thanks for the report. Here is a patch.

Regards,
Martin

P.S. It seems like pyexpat also needs to be told about garbage
collection...

Index: pyexpat.c
===================================================================
RCS file: /cvsroot/pyxml/xml/extensions/pyexpat.c,v
retrieving revision 1.16
diff -u -r1.16 pyexpat.c
--- pyexpat.c	2000/11/02 04:57:40	1.16
+++ pyexpat.c	2000/12/05 00:00:33
@@ -680,6 +680,7 @@
     for (i=0; handler_info[i].name != NULL; i++) {
         Py_XDECREF(self->handlers[i]);
     }
+    free (self->handlers);
 #if PY_MAJOR_VERSION == 1 && PY_MINOR_VERSION < 6
     /* Code for versions before 1.6 */
     free(self);