diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-16 22:53:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-16 23:31:31 +0000 |
commit | 8f9da3e7d0ac3b842bbe31463e18e759bcdd9b31 (patch) | |
tree | 6e15264acb57e4db7004e5fbd8d21a2e624bc4b2 /lotuswordpro | |
parent | 297b1bc47699340fa0c1fc4ada4d01da9f013d1d (diff) |
coverity#738975 Use after free
also...
coverity#738973 Use after free
coverity#738974 Use after free
Change-Id: Iecf2075372d76cded86b92e49225337b95f5ffd1
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwppagelayout.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 5e860c76d1a2..251c8be2f508 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -335,13 +335,15 @@ void LwpPageLayout::RegisterStyle() //Add the page master to stylemanager XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - OUString pmname = pXFStyleManager->AddStyle(pm1)->GetStyleName(); + m_pXFPageMaster = pm1 = (XFPageMaster*)pXFStyleManager->AddStyle(pm1); + OUString pmname = pm1->GetStyleName(); //Add master page XFMasterPage* mp1 = new XFMasterPage(); mp1->SetStyleName(GetName()->str()); mp1->SetPageMaster(pmname); - m_StyleName = pXFStyleManager->AddStyle(mp1)->GetStyleName(); + mp1 = (XFMasterPage*)pXFStyleManager->AddStyle(mp1); + m_StyleName = mp1->GetStyleName(); //Set footer style LwpFooterLayout* pLayoutFooter = GetFooterLayout(); @@ -392,7 +394,8 @@ OUString LwpPageLayout::RegisterEndnoteStyle() //Add the page master to stylemanager XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - OUString pmname = pXFStyleManager->AddStyle(pm1)->GetStyleName(); + m_pXFPageMaster = pm1 = (XFPageMaster*)pXFStyleManager->AddStyle(pm1); + OUString pmname = pm1->GetStyleName(); //Add master page XFMasterPage* mp1 = new XFMasterPage(); |