sw/source/ui/shells/textsh.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 37e1d7a0df85530f6a67adfda76d2c06e05b569e Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Thu Jun 20 13:55:33 2013 -0500 coverity#705765: Resource leak Change-Id: Ibf9d4716e5c5929fe47c836812879f815aa78d6c Reviewed-on: https://gerrit.libreoffice.org/4408 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 62907a4..2b5c607 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -221,10 +221,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aStrURL = URIHelper::SmartRel2Abs( INetURLObject(), aStrURL, URIHelper::GetMaybeFileHdl() ); - INetURLObject* pURL = new INetURLObject(); - pURL->SetSmartProtocol( INET_PROT_FILE ); + INetURLObject url; + url.SetSmartProtocol( INET_PROT_FILE ); - if ( pURL->SetURL( aStrURL, INetURLObject::WAS_ENCODED ) ) + if ( url.SetURL( aStrURL, INetURLObject::WAS_ENCODED ) ) { OUString aName; comphelper::EmbeddedObjectContainer aCnt; @@ -238,7 +238,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if ( xSet.is() ) { xSet->setPropertyValue( OUString("PluginURL"), - uno::makeAny( OUString( pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) ); + uno::makeAny( OUString( url.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits