1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

Memory leak hunting, export more interfaces, updated the doc, Daniel.

This commit is contained in:
Daniel Veillard
1999-03-01 12:28:53 +00:00
parent d692aa49bd
commit bc50b59d36
7 changed files with 487 additions and 71 deletions

View File

@ -132,7 +132,7 @@ PUSH_AND_POP(xmlNodePtr, node)
CHAR
xmlPopInput(xmlParserCtxtPtr ctxt) {
if (ctxt->inputNr == 1) return(0); /* End of main Input */
inputPop(ctxt);
xmlFreeInputStream(inputPop(ctxt));
return(CUR);
}
@ -160,7 +160,7 @@ void
xmlFreeInputStream(xmlParserInputPtr input) {
if (input == NULL) return;
if (input->filename != NULL) return;
if (input->filename != NULL) free((char *) input->filename);
if ((input->free != NULL) && (input->base != NULL))
input->free((char *) input->base);
memset(input, -1, sizeof(xmlParserInput));
@ -3773,6 +3773,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) {
*/
ret = xmlNewReference(ctxt->doc, val);
xmlAddChild(ctxt->node, ret);
ret = NULL;
}
free(val);
}
@ -3787,7 +3788,8 @@ xmlParseContent(xmlParserCtxtPtr ctxt) {
/*
* Pop-up of finished entities.
*/
while ((CUR == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt);
while ((CUR == 0) && (ctxt->inputNr > 1))
xmlPopInput(ctxt);
if (test == CUR_PTR) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))