--- memo_file/memo_file_conduit.c~	2005-07-20 10:36:35.000000000 -0400
+++ memo_file/memo_file_conduit.c	2005-07-20 19:56:27.000000000 -0400
@@ -304,6 +304,8 @@ generate_name (MemoLocalRecord *local, G
 	
 	fname = newfilename (local);
 	categorypath = category_path (local->local.archived?16:local->category, abs);
+	if (local->filename)
+		g_free (local->filename);
 	local->filename = g_strdup_printf ("%s/%s",
 					   categorypath,
 					   fname);
@@ -721,12 +723,6 @@ free_str_foreach (gchar *s, gpointer wha
 	g_free (s);
 }
 
-static void
-free_loadinfo_foreach (LoadInfo *info, gpointer whatever) 
-{
-	g_free (info);
-}
-
 /** loads the records into the abs structure */
 static gboolean
 load_records (GnomePilotConduitStandardAbs *abs) 
@@ -762,16 +758,16 @@ load_records (GnomePilotConduitStandardA
 		if (strcmp (de->d_name,".categories")==0) continue;
 		
 		/* first load id:sec:names from the .ids file */
-		loadinfo = g_hash_table_new (g_str_hash, g_str_equal);
+		loadinfo = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
 		filename = g_strdup_printf ("%s/%s", GET_CONDUIT_CFG (abs)->dir, de->d_name);
 		category = GPOINTER_TO_INT (g_hash_table_lookup (categories, filename));
+		g_free (filename);
 		if (category<0 || category > 16) category = 0;
 		if (category == 16) {
 			/* ignore archived dir */
 			continue;
 		}
-		g_free (filename);
 		
 		filename = g_strdup_printf ("%s/%s/.ids", GET_CONDUIT_CFG (abs)->dir, de->d_name);
 		if ((idfile=fopen (filename,"rt"))!=NULL) {
@@ -816,7 +812,6 @@ load_records (GnomePilotConduitStandardA
 						local->local.secret = info->secret;
 						local->mtime=info->mtime;
 						g_hash_table_remove (loadinfo, local->filename);
-						g_free (info);
 					} else {
 						local->local.ID = 0;
 						local->local.secret = 0;
@@ -845,7 +840,6 @@ load_records (GnomePilotConduitStandardA
 		if (g_hash_table_size (loadinfo)>0) {
 			deleted += g_hash_table_size (loadinfo);
 			g_hash_table_foreach (loadinfo,(GHFunc)create_deleted_record_foreach,&GET_CONDUIT_DATA (abs)->records);
-			g_hash_table_foreach (loadinfo,(GHFunc)free_loadinfo_foreach, NULL);
 		}
 		g_hash_table_destroy (loadinfo);
 	}
