1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00

changed the memory allocation scheme for name in xmlNewNode, Daniel.

This commit is contained in:
Daniel Veillard 1998-07-26 21:31:38 +00:00
parent fe9260038a
commit f8015fac7a
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Sun Jul 26 17:29:52 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* xml_tree: changed the memory allocation scheme for name in xmlNewNode
Sun Jul 26 00:17:51 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* configure.in: added test for CPP

View File

@ -194,7 +194,7 @@ void xmlFreeProp(xmlPropPtr cur) {
/*
* Creation of a new node element in a given DTD.
* We assume that the "name" has already being strdup'd !
* We don't assume that the "name" has already being strdup'd anymore !
*/
xmlNodePtr xmlNewNode(xmlDtdPtr dtd, const CHAR *name, CHAR *content) {
xmlNodePtr cur;
@ -218,7 +218,7 @@ xmlNodePtr xmlNewNode(xmlDtdPtr dtd, const CHAR *name, CHAR *content) {
cur->childs = NULL;
cur->properties = NULL;
cur->type = 0;
cur->name = name;
cur->name = xmlStrdup(name);
cur->dtd = dtd;
if (content != NULL)
cur->content = xmlStrdup(content);