On Tue, Apr 08, 2008 at 01:19:59PM +0800, Ashwin wrote:
>  
> 
> Hi,
> 
> I think the change in xmlNewPropInternal(tree.c Revision 3729) to take care
> of memory failure is incorrect. The coditioon to free name is currently:-
> 
>  
> 
> if ((eatname == 1) &&
> 
>             ((node->doc == NULL) ||
> 
>              (!(xmlDictOwns(node->doc->dict, name) == 0))))
> 
> xmlFree(name);
> 
>  
> 
> According to the above condition name will be freed when it belongs to the
> dictionary which I believe is incorrect. I think the condition should be
> 
>  
> 
> if ((eatname == 1) &&
> 
>             ((node->doc == NULL) ||
> 
>              ((xmlDictOwns(node->doc->dict, name) == 0))))
> 
> Or
> 
> if ((eatname == 1) &&
> 
>             ((node->doc == NULL) ||
> 
>              (!(xmlDictOwns(node->doc->dict, name))))---This is the
> statement used in xmlNewDocNodeEatName

  yes bug from me, i don't know why i used a different expression there
than when I modified xmlNewDocNodeEatName(),

  fixed in SVN, thanks for the heads up !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to