From 860f4eb744af463dd4a0e7d11e7882973ccf1e44 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 28 Aug 2015 02:45:20 +0200 Subject: Fixed some memory leaks in code using libconfig - Special thanks to Dastgir Signed-off-by: Haru --- src/map/map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index a7b171ddf..6e35e6bb6 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5273,8 +5273,6 @@ void read_map_zone_db(void) { } ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' zones in '"CL_WHITE"%s"CL_RESET"'.\n", zone_count, config_filename); - /* not supposed to go in here but in skill_final whatever */ - libconfig->destroy(&map_zone_db); /* post-load processing */ if( (zone = strdb_get(map->zone_db, MAP_ZONE_PVP_NAME)) ) @@ -5284,6 +5282,8 @@ void read_map_zone_db(void) { if( (zone = strdb_get(map->zone_db, MAP_ZONE_BG_NAME)) ) zone->info.special = 1; } + /* not supposed to go in here but in skill_final whatever */ + libconfig->destroy(&map_zone_db); } int map_get_new_bonus_id (void) { -- cgit v1.2.3-60-g2f50