[libxml-devel] [ libxml-Bugs-19258 ] Attribute nodes can be freed() twice.

noreply at rubyforge.org noreply at rubyforge.org
Wed Apr 2 02:32:16 EDT 2008


Bugs item #19258, was opened at 2008-04-02 02:32
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19258&group_id=494

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Joe Khoobyar (walltndr)
Assigned to: Nobody (None)
Summary: Attribute nodes can be freed() twice.

Initial Comment:
If an attribute node is already wrapped, and then is removed from the parent (i.e., by setting it to nil via the []= method), it will eventually get freed twice.  This is because xmlRemoveProp() always frees the node memory.  In these cases xmlUnlinkNode() must be called instead.

See patch 19256 for details, and the addition of a remove! method to XML::Attr

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19258&group_id=494


More information about the libxml-devel mailing list