Commit 20863829 authored by Daniel Veillard's avatar Daniel Veillard

valgrind'ed and cleaned up a couple of memory issues. Daniel

* relaxng.c: valgrind'ed and cleaned up a couple of memory issues.
Daniel
parent 9ff2d478
Sat Mar 22 18:50:45 CET 2003 Daniel Veillard <daniel@veillard.com>
* relaxng.c: valgrind'ed and cleaned up a couple of memory issues.
Sat Mar 22 16:15:50 CET 2003 Daniel Veillard <daniel@veillard.com>
* SAX.c: fix bug #107208 avoid false duplicates when ID/REFs are
......
......@@ -1545,16 +1545,18 @@ xmlRelaxNGValidErrorPush(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidErr err,
xmlGenericError(xmlGenericErrorContext, "malloc failed !\n");
return (0);
}
ctxt->err = NULL;
}
if (ctxt->errNr >= ctxt->errMax) {
ctxt->errMax *= 2;
ctxt->errMax *= 2;
ctxt->errTab =
(xmlRelaxNGValidErrorPtr) xmlRealloc(ctxt->errTab,
ctxt->errMax * sizeof(xmlRelaxNGValidError));
ctxt->errMax * sizeof(xmlRelaxNGValidError));
if (ctxt->errTab == NULL) {
xmlGenericError(xmlGenericErrorContext, "realloc failed !\n");
return (0);
}
ctxt->err = &ctxt->errTab[ctxt->errNr - 1];
}
if ((ctxt->err != NULL) && (ctxt->state != NULL) &&
(ctxt->err->node == ctxt->state->node) &&
......@@ -3588,6 +3590,7 @@ xmlRelaxNGComputeInterleaves(xmlRelaxNGDefinePtr def,
xmlMalloc(sizeof(xmlRelaxNGPartition));
if (partitions == NULL)
goto error;
memset(partitions, 0, sizeof(xmlRelaxNGPartition));
partitions->nbgroups = nbgroups;
partitions->triage = xmlHashCreate(nbgroups);
for (i = 0;i < nbgroups;i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment