mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-13 20:58:16 +03:00
Avoid crash if allocation fails
https://bugzilla.gnome.org/show_bug.cgi?id=704527 xmlSchemaNewValue() may fail on OOM error
This commit is contained in:
parent
ccc9cf9276
commit
717042d2ae
@ -242,6 +242,10 @@ xmlSchemaNewMinLengthFacet(int value)
|
||||
}
|
||||
ret->type = XML_SCHEMA_FACET_MINLENGTH;
|
||||
ret->val = xmlSchemaNewValue(XML_SCHEMAS_NNINTEGER);
|
||||
if (ret->val == NULL) {
|
||||
xmlFree(ret);
|
||||
return(NULL);
|
||||
}
|
||||
ret->val->value.decimal.lo = value;
|
||||
return (ret);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user