diff remap.c @ 341:090b808c421b src

in remap_loadmap() free map before exiting in case of failure ; patch by Erik Hovland - erik hovland org
author nicodvb
date Sat, 19 Apr 2008 10:34:31 +0000
parents 68736572c62c
children 83758bfacd4c
line wrap: on
line diff
--- a/remap.c	Sat Apr 19 10:27:37 2008 +0000
+++ b/remap.c	Sat Apr 19 10:34:31 2008 +0000
@@ -229,7 +229,10 @@
 	}
     }
 
-    if (map->nblocks == 0 && map->debug == 0) return NULL;
+    if (map->nblocks == 0 && map->debug == 0) {
+        free(map);
+        return NULL;
+    }
     return map;
 }