From 16e425425f2496c6320ad1b01114a07e62b8d074 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 23 May 2014 09:35:40 +0100 Subject: coverity#1215292 Resource leak Change-Id: Ibabd73d06135a3ee500ce9d52fef42caa3ad7f35 --- oox/source/export/drawingml.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 994cd9b0c29d..373c3b2305b0 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2363,6 +2363,7 @@ void DrawingML::WriteShape3DEffects( Reference< XPropertySet > xPropSet ) bool bLightRigRotationPresent = false; sax_fastparser::FastAttributeList *aLightRigAttrList = mpFS->createAttrList(); sax_fastparser::FastAttributeList *aLightRigRotationAttrList = mpFS->createAttrList(); + sax_fastparser::XFastAttributeListRef xLightRotAttrList( aLightRigRotationAttrList ); for( sal_Int32 i=0; i < aLightRigProps.getLength(); ++i ) { if( aLightRigProps[i].Name == "rig" || aLightRigProps[i].Name == "dir" ) @@ -2416,8 +2417,7 @@ void DrawingML::WriteShape3DEffects( Reference< XPropertySet > xPropSet ) mpFS->startElementNS( XML_a, XML_lightRig, xAttrList ); if( bLightRigRotationPresent ) { - sax_fastparser::XFastAttributeListRef xRotAttrList( aLightRigRotationAttrList ); - mpFS->singleElementNS( XML_a, XML_rot, xRotAttrList ); + mpFS->singleElementNS( XML_a, XML_rot, xLightRotAttrList ); } mpFS->endElementNS( XML_a, XML_lightRig ); } -- cgit