Fix:map/bin: Fix one more memleak in error case
authorwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 28 Mar 2010 12:03:55 +0000 (12:03 +0000)
committerwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 28 Mar 2010 12:03:55 +0000 (12:03 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3094 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/map/binfile/binfile.c

index 3157be1..09e394a 100644 (file)
@@ -891,8 +891,10 @@ load_changes(struct map_priv *m)
        int size;
        changes_file=g_strdup_printf("%s.log",m->filename);
        changes=fopen(changes_file,"rb");
-       if (! changes)
+       if (! changes) {
+               g_free(changes_file);
                return;
+       }
        m->changes=g_hash_table_new_full(binfile_hash_entry_hash, binfile_hash_entry_equal, g_free, NULL);
        while (fread(&entry, sizeof(entry), 1, changes) == 1) {
                if (fread(&size, sizeof(size), 1, changes) != 1)