diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-05-10 19:49:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-05-10 19:49:07 +0300 |
commit | 4dda0a845c58a428ca4e24f8ac012933bfc12df1 (patch) | |
tree | 787ad8a9776049b53bbd1fbb59974d12b9e2f0e5 /src/ecommon/config.c | |
parent | d4becd02df95dafcc0078ed2f0b924f29023feeb (diff) | |
download | evol-hercules-4dda0a845c58a428ca4e24f8ac012933bfc12df1.tar.gz evol-hercules-4dda0a845c58a428ca4e24f8ac012933bfc12df1.tar.bz2 evol-hercules-4dda0a845c58a428ca4e24f8ac012933bfc12df1.tar.xz evol-hercules-4dda0a845c58a428ca4e24f8ac012933bfc12df1.zip |
Fix memory leak in configuration parameters if same config split into more than one file.s20180518
Diffstat (limited to 'src/ecommon/config.c')
-rw-r--r-- | src/ecommon/config.c | 5 |
1 files changed, 5 insertions, 0 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); } |