diff options
author | Rob Bradford <rob@linux.intel.com> | 2010-03-24 23:50:15 +0000 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2010-03-24 23:56:32 +0000 |
commit | f9c8dd23f7787dc014a01f6661f36c9087be76f6 (patch) | |
tree | de566b087349873a661636b99b966dbfc6af2bfa /rest/rest-xml-parser.c | |
parent | 0e70ee52084763624844796065f701f64b84c39b (diff) | |
download | librest-f9c8dd23f7787dc014a01f6661f36c9087be76f6.tar.gz |
rest-xml-parser: Free the textReader after we close it
This resolves the following leak:
==10948== 43,296 (672 direct, 42,624 indirect) bytes in 2 blocks are
definitely lost in loss record 109 of 124
==10948== at 0x4C2391E: malloc (vg_replace_malloc.c:207)
==10948== by 0x71460DA: xmlNewTextReader (in /usr/lib/libxml2.so.2.7.4)
==10948== by 0x71465A1: xmlReaderForMemory (in /usr/lib/libxml2.so.2.7.4)
==10948== by 0x6C4FF5D: rest_xml_parser_parse_from_data
(rest-xml-parser.c:345)
==10948== by 0xB2211C4: node_from_call (twitter.c:142)
==10948== by 0xB221E5B: verify_cb (twitter.c:487)
==10948== by 0x6C4EF78: _call_async_finished_cb (rest-proxy-call.c:557)
==10948== by 0x5BC43EC: g_closure_invoke (gclosure.c:767)
==10948== by 0x5BD7CDA: signal_emit_unlocked_R (gsignal.c:3247)
==10948== by 0x5BD9081: g_signal_emit_valist (gsignal.c:2980)
==10948== by 0x5BD9552: g_signal_emit (gsignal.c:3037)
==10948== by 0x56E8FAE: soup_message_io_finished (soup-message-io.c:177)
==10948==
Diffstat (limited to 'rest/rest-xml-parser.c')
-rw-r--r-- | rest/rest-xml-parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rest/rest-xml-parser.c b/rest/rest-xml-parser.c index d82b113..4a7e660 100644 --- a/rest/rest-xml-parser.c +++ b/rest/rest-xml-parser.c @@ -459,5 +459,6 @@ rest_xml_parser_parse_from_data (RestXmlParser *parser, } xmlTextReaderClose (priv->reader); + xmlFreeTextReader (priv->reader); return root_node; } |