Bug #564727 - Few memory leaks
authorMilan Crha <mcrha@redhat.com>
Mon, 22 Feb 2010 11:34:58 +0000 (12:34 +0100)
committerMilan Crha <mcrha@redhat.com>
Mon, 22 Feb 2010 11:34:58 +0000 (12:34 +0100)
addressbook/backends/file/e-book-backend-file.c
calendar/libedata-cal/e-cal-backend-file-store.c
calendar/libedata-cal/e-cal-backend-store.c

index 2a8aaa7..7757c15 100644 (file)
@@ -1006,6 +1006,8 @@ e_book_backend_file_upgrade_db (EBookBackendFile *bf, gchar *old_version)
                        db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
                }
 
+               dbc->c_close (dbc);
+
                if (card_failed) {
                        g_warning ("failed to update %d cards", card_failed);
                        return FALSE;
index 6e7bb44..0272078 100644 (file)
@@ -134,7 +134,7 @@ put_component (ECalBackendFileStore *fstore, ECalComponent *comp)
                gchar *rid = e_cal_component_get_recurid_as_string (comp);
 
                g_object_ref (comp);
-               g_hash_table_insert (obj->recurrences, g_strdup (rid), comp);
+               g_hash_table_insert (obj->recurrences, rid, comp);
        }
 
        g_static_rw_lock_writer_unlock (&priv->lock);
index 64dc7e7..ad88478 100644 (file)
@@ -77,6 +77,8 @@ set_store_path (ECalBackendStore *store)
 
                priv->path = g_build_filename (g_get_home_dir (), ".evolution/cache/",
                                component, mangled_uri, NULL);
+
+               g_free (mangled_uri);
        }
 }