branches/KDE/4.2/kdepimlibs/kresources

Volker Krause vkrause at kde.org
Fri May 1 11:04:24 CEST 2009


On Wednesday 29 April 2009 09:54:00 André Wöbbeking wrote:
> SVN commit 960819 by woebbe:
>
> Don't leak KConfig in self().

good catch, but...

> Now only the factories are leaked :-(
>
>  M  +2 -2      factory.cpp
>
>
> --- branches/KDE/4.2/kdepimlibs/kresources/factory.cpp #960818:960819
> @@ -73,8 +73,8 @@
>      mSelves->insert( resourceFamily, factory );
>
>      // Akonadi migration
> -    KConfig *config = new KConfig( "kres-migratorrc" );
> -    KConfigGroup migrationCfg( config, "Migration" );
> +    const KConfig config( "kres-migratorrc" );

... the const here makes the following KConfigGroup read-only and assert as 
soon as we write to it. The result is that every user of the KResource API 
(most of kdepim, but also eg. kopete, konversation and krunner) will crash 
immediately on starting for new users. Rather bad as this apparently went 
into 4.2.3.

The fix is easy (remove the const) and will be applied to trunk and the 4.2 
branch shortly and should go into 4.2.3 if possible.

> +    KConfigGroup migrationCfg( &config, "Migration" );
>      const bool enabled = migrationCfg.readEntry( "Enabled", false );
>      const bool setupClientBrige = migrationCfg.readEntry(
> "SetupClientBridge", true ); const int currentVersion =
> migrationCfg.readEntry( "Version-" + resourceFamily, 0 );

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/release-team/attachments/20090501/031df81a/attachment.sig 


More information about the release-team mailing list