about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2012-09-21 10:41:03 +0200
committerAlexander Barton <alex@barton.de>2012-09-21 10:41:03 +0200
commitef82ef4ddb8b93e3d02197ffeed977d76dd99ba5 (patch)
tree94b146c3e79ee1cbb53c745bd36aaf0b10f605bf
parentbb20aeb9bcbb27eda540a6df2faf2d07e71d23f3 (diff)
downloadngircd-ef82ef4ddb8b93e3d02197ffeed977d76dd99ba5.tar.gz
ngircd-ef82ef4ddb8b93e3d02197ffeed977d76dd99ba5.zip
Free all listen ports on initialization
Now you can reconfigure listen ports and reload the server configuration
on runtime. Without this patch, no ports could be removed.
-rw-r--r--src/ngircd/conf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 5853926e..0052de8f 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -104,6 +104,8 @@ ConfSSL_Init(void)
 	free(Conf_SSLOptions.DHFile);
 	Conf_SSLOptions.DHFile = NULL;
 	array_free_wipe(&Conf_SSLOptions.KeyFilePassword);
+
+	array_free(&Conf_SSLOptions.ListenPorts);
 }
 
 /**
@@ -689,6 +691,7 @@ Set_Defaults(bool InitServers)
 		 PACKAGE_NAME, PACKAGE_VERSION);
 	free(Conf_ListenAddress);
 	Conf_ListenAddress = NULL;
+	array_free(&Conf_ListenPorts);
 	array_free(&Conf_Motd);
 	strlcpy(Conf_MotdFile, SYSCONFDIR, sizeof(Conf_MotdFile));
 	strlcat(Conf_MotdFile, MOTD_FILE, sizeof(Conf_MotdFile));