changeset 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 eea1e72ea1dd
children 83758bfacd4c
files remap.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
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;
 }