diff options
Diffstat (limited to 'mapfile.c')
-rw-r--r-- | mapfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -143,6 +143,8 @@ void map_unlock(struct map_ent **melp) unlink(mapname[2]); fclose(lf); } + if (*melp) + map_free(*melp); lf = NULL; } @@ -266,6 +268,7 @@ void map_remove(struct map_ent **mapp, char *devnm) map_delete(mapp, devnm); map_write(*mapp); map_free(*mapp); + *mapp = NULL; } struct map_ent *map_by_uuid(struct map_ent **map, int uuid[4]) |