[libxml-devel] patch for memory leak
Charlie Savage
cfis at savagexi.com
Tue Jul 1 03:07:42 EDT 2008
Hi Tom,
> I found a memory leak when the value of an attribute is accessed. Fix
> is simple, in function ruby_xml_attr_value in ruby_xml_attr.c, need to
> call xmlFree:
>
> 356,357c356,360
>
> < if (value != NULL)
>
> < return(rb_str_new2((const char*)value));
>
> ---
>
>> if (value != NULL) {
>
>> VALUE retVal = rb_str_new2((const char*)value);
>
>> xmlFree(value);
>
>> return(retVal);
>
Thanks for the patch. I've applied it, and found about 6 other places
similar issues were happening.
Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://rubyforge.org/pipermail/libxml-devel/attachments/20080701/6753ed8a/attachment-0001.bin>
More information about the libxml-devel
mailing list