Commit 0dbc5c1b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix mem leak (too bad it will not in 4.7.1)

parent 7dbe1542
......@@ -294,8 +294,10 @@ uint FolderCollection::identity() const
OrgKdeAkonadiImapSettingsInterface *imapSettingsInterface = Util::createImapSettingsInterface( mCollection.resource() );
if ( imapSettingsInterface->isValid() ) {
QDBusReply<bool> useDefault = imapSettingsInterface->useDefaultIdentity();
if( useDefault.isValid() && useDefault.value() )
if( useDefault.isValid() && useDefault.value() ) {
delete imapSettingsInterface;
return mIdentity;
}
QDBusReply<int> remoteAccountIdent = imapSettingsInterface->accountIdentity();
if ( remoteAccountIdent.isValid() && remoteAccountIdent.value() > 0 ) {
......
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