diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-05 16:10:52 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-05 16:26:15 +0200 |
commit | 713f03d8ff946ebb2bbd8455c053d4c3e57c2ece (patch) | |
tree | 87e6a007748f0b9c3c50b4cf63c0892a0ad4ec25 /cui | |
parent | ecfe2f64d37f9414de3a4910719b4c0edddb727d (diff) |
CID#1078788: fix memory leak
Change-Id: I4ac535c4f5dd3b414771d54ba1718ffe5254b525
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optaboutconfig.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 9084b8dc03bb..abedfede2dfa 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -386,7 +386,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl ) //aProperty.Name = sPropertyPath + OUString("/") + sPropertyName; - Prop_Impl* aProperty = new Prop_Impl( sPropertyPath, sPropertyName, makeAny( sPropertyValue ) ); + Prop_Impl* pProperty = new Prop_Impl( sPropertyPath, sPropertyName, makeAny( sPropertyValue ) ); bool bOpenDialog; OUString sDialogValue; @@ -406,7 +406,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl ) bValue = true; } - aProperty->Value = uno::makeAny( bValue ); + pProperty->Value = uno::makeAny( bValue ); bOpenDialog = false; }else// if ( sPropertyType == OUString( "string" ) ) { @@ -425,12 +425,16 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl ) { sNewValue = pValueDialog->getValue(); //TODO: parse the value according to the type? - aProperty->Value = uno::makeAny( sNewValue ); - AddToModifiedVector( aProperty ); + pProperty->Value = uno::makeAny( sNewValue ); + AddToModifiedVector( pProperty ); sDialogValue = sNewValue; } + else + delete pProperty; } + else + delete pProperty; pPrefBox->SetEntryText( sDialogValue, pEntry, 3 ); //TODO:update listbox value. |