diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 2a8aaa7..7757c15 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -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;
diff --git a/calendar/libedata-cal/e-cal-backend-file-store.c b/calendar/libedata-cal/e-cal-backend-file-store.c
index 6e7bb44..0272078 100644
--- a/calendar/libedata-cal/e-cal-backend-file-store.c
+++ b/calendar/libedata-cal/e-cal-backend-file-store.c
@@ -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);
diff --git a/calendar/libedata-cal/e-cal-backend-store.c b/calendar/libedata-cal/e-cal-backend-store.c
index 64dc7e7..ad88478 100644
--- a/calendar/libedata-cal/e-cal-backend-store.c
+++ b/calendar/libedata-cal/e-cal-backend-store.c
@@ -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);
 	}
 }
 
