| 7560 | } |
| 7561 | |
| 7562 | static void |
| 7563 | dtdDestroy(DTD *p, XML_Bool isDocEntity, XML_Parser parser) { |
| 7564 | HASH_TABLE_ITER iter; |
| 7565 | hashTableIterInit(&iter, &(p->elementTypes)); |
| 7566 | for (;;) { |
| 7567 | ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter); |
| 7568 | if (! e) |
| 7569 | break; |
| 7570 | if (e->allocDefaultAtts != 0) |
| 7571 | FREE(parser, e->defaultAtts); |
| 7572 | } |
| 7573 | hashTableDestroy(&(p->generalEntities)); |
| 7574 | #ifdef XML_DTD |
| 7575 | hashTableDestroy(&(p->paramEntities)); |
| 7576 | #endif /* XML_DTD */ |
| 7577 | hashTableDestroy(&(p->elementTypes)); |
| 7578 | hashTableDestroy(&(p->attributeIds)); |
| 7579 | hashTableDestroy(&(p->prefixes)); |
| 7580 | poolDestroy(&(p->pool)); |
| 7581 | poolDestroy(&(p->entityValuePool)); |
| 7582 | if (isDocEntity) { |
| 7583 | FREE(parser, p->scaffIndex); |
| 7584 | FREE(parser, p->scaffold); |
| 7585 | } |
| 7586 | FREE(parser, p); |
| 7587 | } |
| 7588 | |
| 7589 | /* Do a deep copy of the DTD. Return 0 for out of memory, non-zero otherwise. |
| 7590 | The new DTD has already been initialized. |
no test coverage detected
searching dependent graphs…