* modest-main.c, modest-tny-account-store.c:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 11 Jan 2007 07:52:07 +0000 (07:52 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 11 Jan 2007 07:52:07 +0000 (07:52 +0000)
  - fix two leaks

pmo-trunk-r607

src/modest-main.c
src/modest-tny-account-store.c

index 3b59c39..0b2b0c1 100644 (file)
@@ -154,6 +154,8 @@ main (int argc, char *argv[])
                
        
 cleanup:
+       g_object_unref (G_OBJECT(fact));
+       /* this will clean up account_store as well */
        
        return retval;
 }
index 561e0f8..8f9dfda 100644 (file)
@@ -43,6 +43,8 @@
 #include "modest-tny-account-store.h"
 #include "modest-tny-platform-factory.h"
 
+#include <camel/camel.h>
+
 /* 'private'/'protected' functions */
 static void modest_tny_account_store_class_init   (ModestTnyAccountStoreClass *klass);
 //static void modest_tny_account_store_init         (ModestTnyAccountStore *obj);
@@ -433,7 +435,7 @@ modest_tny_account_store_finalize (GObject *obj)
        }
 
        if (priv->tny_session_camel) {
-               // FIXME: how to kill a camel
+               camel_object_unref (CAMEL_OBJECT(priv->tny_session_camel));
                priv->tny_session_camel = NULL;
        }