mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
- hash.[ch]: added a first version of xmlHashSize()
- valid.c: another bug fix from Gary Pennington Daniel
This commit is contained in:
8
valid.c
8
valid.c
@ -1775,8 +1775,12 @@ xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
|
||||
* !!! Should we keep track of all refs ? and use xmlHashAddEntry2 ?
|
||||
*/
|
||||
if (xmlHashAddEntry(table, value, ret) < 0) {
|
||||
xmlFreeRef(ret);
|
||||
return(NULL);
|
||||
/*
|
||||
* Since there is no discrimination on error returns
|
||||
* from xmlHashAddEntry, I'm presuming <0 means the
|
||||
* key already exists.
|
||||
*/
|
||||
xmlHashUpdateEntry(table, value, ret, (xmlHashDeallocator) xmlFreeRef);
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
Reference in New Issue
Block a user