mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
pattern: Report malloc failures
Fix places where malloc failures aren't reported. Introduce a new API function xmlPatternCompileSafe that returns a separate error code if a memory allocation fails.
This commit is contained in:
@@ -54,6 +54,12 @@ XMLPUBFUN xmlPatternPtr
|
||||
xmlDict *dict,
|
||||
int flags,
|
||||
const xmlChar **namespaces);
|
||||
XMLPUBFUN int
|
||||
xmlPatternCompileSafe (const xmlChar *pattern,
|
||||
xmlDict *dict,
|
||||
int flags,
|
||||
const xmlChar **namespaces,
|
||||
xmlPatternPtr *patternOut);
|
||||
XMLPUBFUN int
|
||||
xmlPatternMatch (xmlPatternPtr comp,
|
||||
xmlNodePtr node);
|
||||
|
||||
Reference in New Issue
Block a user