diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-03-20 07:21:27 +0100 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-03-20 07:21:27 +0100 |
commit | 3640717c8153e8b8e212e3aaa505007f7b8b0430 (patch) | |
tree | acb3a41c2cc54cb44654f01aa2e75536e8729cc3 | |
parent | a8c96af2bca17fcd031a245c52da314ab4902013 (diff) |
coverity#1288897 Resource leak
Here pRet was used to change the input set, so
use SetInputSet to get the same result.
Plus rename pRet since it's not a return value
any more.
Change-Id: I9e75abe2a86b372beb6fe5bd211dcf4fbbefb3da
-rw-r--r-- | sd/source/ui/dlg/tabtempl.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx index a213c380cd10..e2e7613cabe8 100644 --- a/sd/source/ui/dlg/tabtempl.cxx +++ b/sd/source/ui/dlg/tabtempl.cxx @@ -174,15 +174,15 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) void SdTabTemplateDlg::RefreshInputSet() { - SfxItemSet* pRet = GetInputSetImpl(); + SfxItemSet* pInputSet = GetInputSetImpl(); - if( pRet ) + if( pInputSet ) { - pRet->ClearItem(); - pRet->SetParent( GetStyleSheet().GetItemSet().GetParent() ); + pInputSet->ClearItem(); + pInputSet->SetParent( GetStyleSheet().GetItemSet().GetParent() ); } else - pRet = new SfxItemSet( GetStyleSheet().GetItemSet() ); + SetInputSet(&GetStyleSheet().GetItemSet()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |