diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-07 15:47:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-08 08:45:41 +0200 |
commit | 7764ae70b04058a64a3999529e98d1115ba59d1c (patch) | |
tree | 23a78251b97610b7a948ef776dfbcbc48aefbd8d /ucb | |
parent | 37d5bf82eae7e6d611879d1132b1f6fdafdeb9ed (diff) |
clang bugprone-unused-return-value
most of these changes just make the change of ownership when using
std::unique_ptr clearer, but there is one definite leak fix in
PlainTextFilterDetect::detect
Change-Id: I8282a68007222a4fee84004f394bde0cca8569e9
Reviewed-on: https://gerrit.libreoffice.org/60159
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx index 434c924d5932..b49a2cad68f1 100644 --- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx @@ -70,9 +70,8 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( std::unique_ptr< DAVSession > xElement( new NeonSession( this, inUri, rFlags, *m_xProxyDecider.get() ) ); - aIt = m_aMap.emplace( inUri, xElement.get() ).first; + aIt = m_aMap.emplace( inUri, xElement.release() ).first; aIt->second->m_aContainerIt = aIt; - xElement.release(); return aIt->second; } else if ( osl_atomic_increment( &aIt->second->m_nRefCount ) > 1 ) |