1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-19 05:43:19 +03:00

- SAX.c entities.c parser.c: changed completely the way entities

are handled when running the parser in entity substitution mode.
  This fixes a bug reported by Stephan Kulow and nearly divides
  by 3 the amount of memory required by libxslt to load and process
  DocBook TDG.
Daniel
This commit is contained in:
Daniel Veillard
2001-07-04 19:49:14 +00:00
parent f420ac55f8
commit 62f313ba0c
4 changed files with 64 additions and 12 deletions

View File

@ -46,7 +46,7 @@ xmlHashTablePtr xmlPredefinedEntities = NULL;
static void xmlFreeEntity(xmlEntityPtr entity) {
if (entity == NULL) return;
if (entity->children)
if ((entity->children) && (entity->children->parent == entity))
xmlFreeNodeList(entity->children);
if (entity->name != NULL)
xmlFree((char *) entity->name);