Kaydet (Commit) 1ca67515 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix CntHTTPCookieList_impl leak

üst e87810b6
...@@ -1163,7 +1163,6 @@ sdr::table::SdrTableObj::getRowCount() const ...@@ -1163,7 +1163,6 @@ sdr::table::SdrTableObj::getRowCount() const
sfx2::TaskPaneWrapper::GetChildWindowId() sfx2::TaskPaneWrapper::GetChildWindowId()
slideshow::internal::DrawShapeSubsetting::reset(slideshow::internal::DocTreeNode const&, boost::shared_ptr<GDIMetaFile> const&) 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::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<OrderedEntry*, std::allocator<OrderedEntry*> >::~vector()
std::__cxx1998::vector<ServiceInfo*, std::allocator<ServiceInfo*> >::~vector() std::__cxx1998::vector<ServiceInfo*, std::allocator<ServiceInfo*> >::~vector()
std::__cxx1998::vector<SfxFilter*, std::allocator<SfxFilter*> >::~vector() std::__cxx1998::vector<SfxFilter*, std::allocator<SfxFilter*> >::~vector()
......
...@@ -71,7 +71,7 @@ handleCookiesRequest_( ...@@ -71,7 +71,7 @@ handleCookiesRequest_(
rContinuations) rContinuations)
SAL_THROW((uno::RuntimeException)) SAL_THROW((uno::RuntimeException))
{ {
CntHTTPCookieList_impl* pCookies = new CntHTTPCookieList_impl(); CntHTTPCookieList_impl aCookies;
for (sal_Int32 i = 0; i < rRequest.Cookies.getLength(); ++i) for (sal_Int32 i = 0; i < rRequest.Cookies.getLength(); ++i)
{ {
try try
...@@ -109,7 +109,7 @@ handleCookiesRequest_( ...@@ -109,7 +109,7 @@ handleCookiesRequest_(
OSL_ASSERT(false); OSL_ASSERT(false);
break; break;
} }
pCookies->push_back( xCookie.get() ); aCookies.push_back( xCookie.get() );
xCookie.release(); xCookie.release();
} }
catch (std::bad_alloc const &) catch (std::bad_alloc const &)
...@@ -123,7 +123,7 @@ handleCookiesRequest_( ...@@ -123,7 +123,7 @@ handleCookiesRequest_(
CntHTTPCookieRequest CntHTTPCookieRequest
aRequest(rRequest.URL, aRequest(rRequest.URL,
*pCookies, aCookies,
rRequest.Request == ucb::CookieRequest_RECEIVE rRequest.Request == ucb::CookieRequest_RECEIVE
? CNTHTTP_COOKIE_REQUEST_RECV ? CNTHTTP_COOKIE_REQUEST_RECV
: CNTHTTP_COOKIE_REQUEST_SEND); : CNTHTTP_COOKIE_REQUEST_SEND);
...@@ -154,7 +154,7 @@ handleCookiesRequest_( ...@@ -154,7 +154,7 @@ handleCookiesRequest_(
for (sal_Int32 j = 0; j < rRequest.Cookies.getLength(); ++j) for (sal_Int32 j = 0; j < rRequest.Cookies.getLength(); ++j)
if (rRequest.Cookies[j].Policy if (rRequest.Cookies[j].Policy
== ucb::CookiePolicy_CONFIRM) == ucb::CookiePolicy_CONFIRM)
switch ( (*pCookies)[ j ]->m_nPolicy ) switch ( (aCookies)[ j ]->m_nPolicy )
{ {
case CNTHTTP_COOKIE_POLICY_ACCEPTED: case CNTHTTP_COOKIE_POLICY_ACCEPTED:
xCookieHandling-> xCookieHandling->
......
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