summaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-11 15:50:43 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-11 15:50:43 +0200
commita45a313422efa33f261cb1b53a08646a6b3ab947 (patch)
treeabe0d81b6dba97106b1016722e210f02a0168733 /src/config.c
parente5a8f900352b242860ac3dd4e3b39c7297169480 (diff)
downloadfastd-a45a313422efa33f261cb1b53a08646a6b3ab947.tar
fastd-a45a313422efa33f261cb1b53a08646a6b3ab947.zip
Improve shell command config handling
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/config.c b/src/config.c
index 7876f75..58327a5 100644
--- a/src/config.c
+++ b/src/config.c
@@ -691,25 +691,19 @@ void fastd_config_release(fastd_context_t *ctx, fastd_config_t *conf) {
fastd_mac_config_free(conf->macs);
fastd_cipher_config_free(conf->ciphers);
+ fastd_shell_command_unset(&conf->on_pre_up);
+ fastd_shell_command_unset(&conf->on_up);
+ fastd_shell_command_unset(&conf->on_down);
+ fastd_shell_command_unset(&conf->on_post_down);
+ fastd_shell_command_unset(&conf->on_establish);
+ fastd_shell_command_unset(&conf->on_disestablish);
+ fastd_shell_command_unset(&conf->on_verify);
+
free(conf->user);
free(conf->group);
free(conf->groups);
free(conf->ifname);
free(conf->secret);
- free(conf->on_pre_up);
- free(conf->on_pre_up_dir);
- free(conf->on_up);
- free(conf->on_up_dir);
- free(conf->on_down);
- free(conf->on_down_dir);
- free(conf->on_post_down);
- free(conf->on_post_down_dir);
- free(conf->on_establish);
- free(conf->on_establish_dir);
- free(conf->on_disestablish);
- free(conf->on_disestablish_dir);
- free(conf->on_verify);
- free(conf->on_verify_dir);
free(conf->protocol_config);
free(conf->log_syslog_ident);
}