Skip to content

Commit 1e52123

Browse files
committed
TextReader::get_xml_lang(): Fix memory leak
1 parent fd1d79f commit 1e52123

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libxml++/parsers/textreader.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ ustring TextReader::get_value() const
186186
ustring TextReader::get_xml_lang() const
187187
{
188188
return propertyreader->String(
189-
xmlTextReaderXmlLang(impl_));
189+
xmlTextReaderXmlLang(impl_), true);
190190
}
191191

192192
TextReader::ReadState TextReader::get_read_state() const
@@ -221,7 +221,8 @@ ustring TextReader::get_attribute(
221221
const ustring& namespaceURI) const
222222
{
223223
return propertyreader->String(
224-
xmlTextReaderGetAttributeNs(impl_, (const xmlChar *)localName.c_str(), (const xmlChar *)namespaceURI.c_str()), true);
224+
xmlTextReaderGetAttributeNs(impl_, (const xmlChar *)localName.c_str(),
225+
(const xmlChar *)namespaceURI.c_str()), true);
225226
}
226227

227228
ustring TextReader::lookup_namespace(

0 commit comments

Comments
 (0)