Index: ChangeLog =================================================================== --- ChangeLog (revision 3572) +++ ChangeLog (revision 3573) @@ -1,3 +1,8 @@ +Tue Jan 9 22:24:26 CET 2007 Daniel Veillard + + * python/libxml.c: fix a memory leak in the python string handling + when SAX event are passed back to the python handlers + Thu Jan 4 18:27:49 CET 2007 Daniel Veillard * xmlreader.c: fix xmlTextReaderSetup() description Index: python/libxml.c =================================================================== --- python/libxml.c (revision 3572) +++ python/libxml.c (revision 3573) @@ -773,6 +773,8 @@ attrvalue = Py_None; } PyDict_SetItem(dict, attrname, attrvalue); + Py_DECREF(attrname); + Py_DECREF(attrvalue); } } @@ -1170,6 +1172,7 @@ for (node = tree; node != NULL; node = node->next) { newName = PyString_FromString((char *) node->name); PyList_SetItem(nameList, count, newName); + Py_DECREF(newName); count++; } result = PyObject_CallMethod(handler, (char *) "attributeDecl",