summaryrefslogtreecommitdiff
path: root/xmloff/source/transform/StyleOOoTContext.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-18 17:05:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-08-18 21:08:40 +0100
commit9b181fa48f20b09bcfd9de1fb433a1b21d1546c3 (patch)
tree0a5d510a8fa2137178bd2704aa56b1619c2de6a1 /xmloff/source/transform/StyleOOoTContext.cxx
parentf20090c4313eddfac481b8ac8cb98f4bb9cfec0a (diff)
coverity#1371368 Resource leak
Change-Id: I5c35b3eaa6e9afe10096bf5013f83ff51cb870a4
Diffstat (limited to 'xmloff/source/transform/StyleOOoTContext.cxx')
-rw-r--r--xmloff/source/transform/StyleOOoTContext.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 4f28f654541e..9d2d46c6b625 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -810,12 +810,13 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
XMLPersAttrListTContext *pSymbolImageContext = new XMLPersAttrListTContext(
GetTransformer(), GetTransformer().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_CHART, GetXMLToken( XML_SYMBOL_IMAGE )));
+ rtl::Reference<XMLTransformerContext> xSymbolImageContext(pSymbolImageContext);
OUString aAttrValue( sAttrValue );
if( GetTransformer().ConvertURIToOASIS( aAttrValue, true ))
{
pSymbolImageContext->AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aAttrValue );
- pContext->AddContent( pSymbolImageContext );
+ pContext->AddContent(xSymbolImageContext);
}
}
break;