[Gtkradiant] [Bug 354] Moving preferences over to using XML

gtkradiant@zerowing.idsoftware.com gtkradiant@zerowing.idsoftware.com
Thu, 31 Jan 2002 12:00:00 -0600


http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=354

gbiggans@uglab.eee.strath.ac.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|                            |All



------- Additional Comments From gbiggans@uglab.eee.strath.ac.uk  2002-01-31 11:59 -------
>   xmlNodePtr pNode = mpDocNode->children;
>   while (pNode)
>   {
>     if (xmlGetProp(pNode, (xmlChar *)"name") && !strcmp(name, (char *)
xmlGetProp(pNode, (xmlChar *)"name")))
>       return pNode;
>     pNode = pNode->next;
>   }
>   return NULL;

needs to be:

>   xmlNodePtr pNode = mpDocNode->children;
>   while (pNode)
>   {
>     xmlhChar* prop = xmlGetProp(pNode, (xmlChar *)"name");
>     if (prop && !strcmp(name, (char *)prop))
>     {
>       xmlFree(prop);
>       return pNode;
>     }
>     xmlFree(prop);
>     pNode = pNode->next;
>   }
>   return NULL;

to prevent a mem leak.



------- You are receiving this mail because: -------
Whoops!  I have no idea!