summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/cmis/cmis_repo_content.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/ucp/cmis/cmis_repo_content.cxx')
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 4d2504978388..ea99c3509063 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -37,6 +37,7 @@
#include "cmis_provider.hxx"
#include "cmis_repo_content.hxx"
#include "cmis_resultset.hxx"
+#include <boost/scoped_ptr.hpp>
#define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
@@ -177,17 +178,16 @@ namespace cmis
ALFRESCO_CLOUD_SCOPE, ALFRESCO_CLOUD_REDIRECT_URI,
ALFRESCO_CLOUD_CLIENT_ID, ALFRESCO_CLOUD_CLIENT_SECRET ) );
- libcmis::Session* session = libcmis::SessionFactory::createSession(
+ boost::scoped_ptr<libcmis::Session> session(libcmis::SessionFactory::createSession(
OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ),
- rUsername, rPassword, "", false, oauth2Data );
- if (session == NULL )
+ rUsername, rPassword, "", false, oauth2Data ));
+ if (!session)
ucbhelper::cancelCommandExecution(
ucb::IOErrorCode_INVALID_DEVICE,
uno::Sequence< uno::Any >( 0 ),
xEnv,
OUString( ) );
m_aRepositories = session->getRepositories( );
- delete session;
}
catch (const libcmis::Exception& e)
{