diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-25 23:29:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-27 09:45:57 +0000 |
commit | 1ca675157d753371acd35aad4d824fb4f20f3330 (patch) | |
tree | f9c48e3a74cf8b85ae67bb8e6ee00b0079e72f72 | |
parent | e87810b69331f5d62cbeac0182c5bc2143f8856f (diff) |
fix CntHTTPCookieList_impl leak
-rwxr-xr-x | unusedcode.easy | 1 | ||||
-rw-r--r-- | uui/source/iahndl-cookies.cxx | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/unusedcode.easy b/unusedcode.easy index 3881c2e1b9ab..49ab88d5c53f 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1163,7 +1163,6 @@ sdr::table::SdrTableObj::getRowCount() const sfx2::TaskPaneWrapper::GetChildWindowId() slideshow::internal::DrawShapeSubsetting::reset(slideshow::internal::DocTreeNode const&, boost::shared_ptr<GDIMetaFile> const&) std::__cxx1998::multimap<_xmlNode*, com::sun::star::uno::Reference<com::sun::star::xml::dom::events::XEventListener>, std::less<_xmlNode*>, std::allocator<std::pair<_xmlNode* const, com::sun::star::uno::Reference<com::sun::star::xml::dom::events::XEventListener> > > >::~multimap() -std::__cxx1998::vector<CntHTTPCookie*, std::allocator<CntHTTPCookie*> >::~vector() std::__cxx1998::vector<OrderedEntry*, std::allocator<OrderedEntry*> >::~vector() std::__cxx1998::vector<ServiceInfo*, std::allocator<ServiceInfo*> >::~vector() std::__cxx1998::vector<SfxFilter*, std::allocator<SfxFilter*> >::~vector() diff --git a/uui/source/iahndl-cookies.cxx b/uui/source/iahndl-cookies.cxx index 4ef37b32f495..6bfeb8be2258 100644 --- a/uui/source/iahndl-cookies.cxx +++ b/uui/source/iahndl-cookies.cxx @@ -71,7 +71,7 @@ handleCookiesRequest_( rContinuations) SAL_THROW((uno::RuntimeException)) { - CntHTTPCookieList_impl* pCookies = new CntHTTPCookieList_impl(); + CntHTTPCookieList_impl aCookies; for (sal_Int32 i = 0; i < rRequest.Cookies.getLength(); ++i) { try @@ -109,7 +109,7 @@ handleCookiesRequest_( OSL_ASSERT(false); break; } - pCookies->push_back( xCookie.get() ); + aCookies.push_back( xCookie.get() ); xCookie.release(); } catch (std::bad_alloc const &) @@ -123,7 +123,7 @@ handleCookiesRequest_( CntHTTPCookieRequest aRequest(rRequest.URL, - *pCookies, + aCookies, rRequest.Request == ucb::CookieRequest_RECEIVE ? CNTHTTP_COOKIE_REQUEST_RECV : CNTHTTP_COOKIE_REQUEST_SEND); @@ -154,7 +154,7 @@ handleCookiesRequest_( for (sal_Int32 j = 0; j < rRequest.Cookies.getLength(); ++j) if (rRequest.Cookies[j].Policy == ucb::CookiePolicy_CONFIRM) - switch ( (*pCookies)[ j ]->m_nPolicy ) + switch ( (aCookies)[ j ]->m_nPolicy ) { case CNTHTTP_COOKIE_POLICY_ACCEPTED: xCookieHandling-> |