mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
fix a memory leak in the python string handling when SAX event are passed
* python/libxml.c: fix a memory leak in the python string handling when SAX event are passed back to the python handlers Daniel svn path=/trunk/; revision=3573
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jan 9 22:24:26 CET 2007 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* 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 <daniel@veillard.com>
|
Thu Jan 4 18:27:49 CET 2007 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* xmlreader.c: fix xmlTextReaderSetup() description
|
* xmlreader.c: fix xmlTextReaderSetup() description
|
||||||
|
@ -773,6 +773,8 @@ pythonStartElement(void *user_data, const xmlChar * name,
|
|||||||
attrvalue = Py_None;
|
attrvalue = Py_None;
|
||||||
}
|
}
|
||||||
PyDict_SetItem(dict, attrname, attrvalue);
|
PyDict_SetItem(dict, attrname, attrvalue);
|
||||||
|
Py_DECREF(attrname);
|
||||||
|
Py_DECREF(attrvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1170,6 +1172,7 @@ pythonAttributeDecl(void *user_data,
|
|||||||
for (node = tree; node != NULL; node = node->next) {
|
for (node = tree; node != NULL; node = node->next) {
|
||||||
newName = PyString_FromString((char *) node->name);
|
newName = PyString_FromString((char *) node->name);
|
||||||
PyList_SetItem(nameList, count, newName);
|
PyList_SetItem(nameList, count, newName);
|
||||||
|
Py_DECREF(newName);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
result = PyObject_CallMethod(handler, (char *) "attributeDecl",
|
result = PyObject_CallMethod(handler, (char *) "attributeDecl",
|
||||||
|
Reference in New Issue
Block a user