summaryrefslogtreecommitdiff
path: root/src/elogin
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-10 19:49:07 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-10 19:49:07 +0300
commit4dda0a845c58a428ca4e24f8ac012933bfc12df1 (patch)
tree787ad8a9776049b53bbd1fbb59974d12b9e2f0e5 /src/elogin
parentd4becd02df95dafcc0078ed2f0b924f29023feeb (diff)
downloadevol-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/elogin')
-rw-r--r--src/elogin/config.c4
1 files changed, 3 insertions, 1 deletions
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);
}