Kaydet (Commit) 37e1d7a0 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud Kaydeden (comit) Michael Stahl

coverity#705765: Resource leak

Change-Id: Ibf9d4716e5c5929fe47c836812879f815aa78d6c
Reviewed-on: https://gerrit.libreoffice.org/4408Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst cf003b22
...@@ -221,10 +221,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) ...@@ -221,10 +221,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aStrURL = URIHelper::SmartRel2Abs( aStrURL = URIHelper::SmartRel2Abs(
INetURLObject(), aStrURL, URIHelper::GetMaybeFileHdl() ); INetURLObject(), aStrURL, URIHelper::GetMaybeFileHdl() );
INetURLObject* pURL = new INetURLObject(); INetURLObject url;
pURL->SetSmartProtocol( INET_PROT_FILE ); url.SetSmartProtocol( INET_PROT_FILE );
if ( pURL->SetURL( aStrURL, INetURLObject::WAS_ENCODED ) ) if ( url.SetURL( aStrURL, INetURLObject::WAS_ENCODED ) )
{ {
OUString aName; OUString aName;
comphelper::EmbeddedObjectContainer aCnt; comphelper::EmbeddedObjectContainer aCnt;
...@@ -238,7 +238,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) ...@@ -238,7 +238,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if ( xSet.is() ) if ( xSet.is() )
{ {
xSet->setPropertyValue( OUString("PluginURL"), xSet->setPropertyValue( OUString("PluginURL"),
uno::makeAny( OUString( pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) ); uno::makeAny( OUString( url.GetMainURL( INetURLObject::NO_DECODE ) ) ) );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment