diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ecommon/config.c | 5 | ||||
-rw-r--r-- | src/elogin/config.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ecommon/config.c b/src/ecommon/config.c index 6bc7205..677e408 100644 --- a/src/ecommon/config.c +++ b/src/ecommon/config.c @@ -23,6 +23,11 @@ int default_y = 0; void config_default_map(const char *key __attribute__ ((unused)), const char *val) { + if (mapindex->default_map != NULL && + strcmp(mapindex->default_map, MAP_DEFAULT) == 0) + { + aFree(mapindex->default_map); + } mapindex->default_map = aStrdup(val); } diff --git a/src/elogin/config.c b/src/elogin/config.c index 18f8275..8497a7e 100644 --- a/src/elogin/config.c +++ b/src/elogin/config.c @@ -20,11 +20,13 @@ char *update_server = NULL; void config_update_server(const char *key __attribute__ ((unused)), const char *val) { + if (update_server != NULL) + aFree(update_server); update_server = aStrdup(val); } void config_final(void) { - if (update_server) + if (update_server != NULL) aFree(update_server); } |