[xml] Regarding SVN Revision 3729 in tree.c



 

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

 

Regards

Ashwin

 

 

 

 

 

 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]