mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
valid: Improve addition and deletion of IDs
Introduce a new API function xmlAddIDSafe that returns a separate error code if a memory allocation fails. Store a pointer to the ID struct in xmlAttr so attributes can be freed without allocating memory. It's impossible to report malloc failures in deallocation code.
This commit is contained in:
@@ -440,6 +440,7 @@ struct _xmlAttr {
|
||||
xmlNs *ns; /* pointer to the associated namespace */
|
||||
xmlAttributeType atype; /* the attribute type if validating */
|
||||
void *psvi; /* for type/PSVI information */
|
||||
struct _xmlID *id; /* the ID struct */
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user