mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-19 05:43:19 +03:00
added xmlMallocAtomic() to be used when allocating blocks which do not
* DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c include/libxml/globals.h include/libxml/xmlmemory.h: added xmlMallocAtomic() to be used when allocating blocks which do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet() to allow registering the full set of functions needed by a garbage collecting allocator like libgc, ref #109944 Daniel
This commit is contained in:
@ -2792,7 +2792,7 @@ xmlRegExecPushString2(xmlRegExecCtxtPtr exec, const xmlChar *value,
|
||||
lenp = strlen((char *) value);
|
||||
|
||||
if (150 < lenn + lenp + 2) {
|
||||
str = (xmlChar *) xmlMalloc(lenn + lenp + 2);
|
||||
str = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
|
||||
if (str == NULL) {
|
||||
exec->status = -1;
|
||||
return(-1);
|
||||
@ -4114,7 +4114,7 @@ xmlAutomataNewTransition2(xmlAutomataPtr am, xmlAutomataStatePtr from,
|
||||
lenn = strlen((char *) token2);
|
||||
lenp = strlen((char *) token);
|
||||
|
||||
str = (xmlChar *) xmlMalloc(lenn + lenp + 2);
|
||||
str = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
|
||||
if (str == NULL) {
|
||||
xmlRegFreeAtom(atom);
|
||||
return(NULL);
|
||||
|
Reference in New Issue
Block a user