summaryrefslogtreecommitdiff
path: root/navit/maptool/osm.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/maptool/osm.c')
-rw-r--r--navit/maptool/osm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index c6308c2b4..ddf4e99a1 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -2592,6 +2592,11 @@ static void process_associated_streets_setup(FILE *in, struct relations *relatio
relations_add_relation_default_entry(relations, relations_func);
}
+/* to adapt g_free to GFunc */
+static void g_free_helper(void * data, void * user_data) {
+ g_free(data);
+}
+
void process_associated_streets(FILE *in, struct files_relation_processing *files_relproc) {
struct relations *relations=relations_new();
struct process_relation_member_func_priv fp= {NULL,NULL};
@@ -2618,7 +2623,7 @@ void process_associated_streets(FILE *in, struct files_relation_processing *file
}
relations_destroy(relations);
- g_list_foreach(fp.allocations, (GFunc)free, NULL);
+ g_list_foreach(fp.allocations, (GFunc)g_free_helper, NULL);
g_list_free(fp.allocations);
}
@@ -2674,7 +2679,7 @@ void process_house_number_interpolations(FILE *in, struct files_relation_process
}
relations_destroy(relations);
- g_list_foreach(fp.allocations, (GFunc)free, NULL);
+ g_list_foreach(fp.allocations, (GFunc)g_free_helper, NULL);
g_list_free(fp.allocations);
}