Mercurial > hg > freeDiameter
comparison freeDiameter/config.c @ 447:097bae83b07a
Forgot to cleanup the configuration on exit, spotted by valgrind
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 29 Jul 2010 11:36:40 +0900 |
parents | 26aafbbc1640 |
children | 0b6cee362f5d |
comparison
equal
deleted
inserted
replaced
446:66f58cecf3cd | 447:097bae83b07a |
---|---|
268 { TRACE_DEBUG(INFO, "Error in DH bits value : %d", GNUTLS_DEFAULT_DHBITS); return EINVAL; } ); | 268 { TRACE_DEBUG(INFO, "Error in DH bits value : %d", GNUTLS_DEFAULT_DHBITS); return EINVAL; } ); |
269 } | 269 } |
270 | 270 |
271 return 0; | 271 return 0; |
272 } | 272 } |
273 | |
274 | |
275 /* Destroy contents of fd_g_config structure */ | |
276 int fd_conf_deinit() | |
277 { | |
278 TRACE_ENTRY(); | |
279 | |
280 /* Free the TLS parameters */ | |
281 gnutls_priority_deinit(fd_g_config->cnf_sec_data.prio_cache); | |
282 gnutls_dh_params_deinit(fd_g_config->cnf_sec_data.dh_cache); | |
283 gnutls_certificate_free_credentials(fd_g_config->cnf_sec_data.credentials); | |
284 | |
285 free(fd_g_config->cnf_sec_data.cert_file); fd_g_config->cnf_sec_data.cert_file = NULL; | |
286 free(fd_g_config->cnf_sec_data.key_file); fd_g_config->cnf_sec_data.key_file = NULL; | |
287 free(fd_g_config->cnf_sec_data.ca_file); fd_g_config->cnf_sec_data.ca_file = NULL; | |
288 free(fd_g_config->cnf_sec_data.crl_file); fd_g_config->cnf_sec_data.crl_file = NULL; | |
289 free(fd_g_config->cnf_sec_data.prio_string); fd_g_config->cnf_sec_data.prio_string = NULL; | |
290 | |
291 /* Destroy dictionary */ | |
292 CHECK_FCT_DO( fd_dict_fini(&fd_g_config->cnf_dict), ); | |
293 | |
294 /* Destroy the main event queue */ | |
295 CHECK_FCT_DO( fd_fifo_del(&fd_g_config->cnf_main_ev), ); | |
296 | |
297 /* Destroy the local endpoints and applications */ | |
298 CHECK_FCT_DO(fd_ep_filter(&fd_g_config->cnf_endpoints, 0 ), ); | |
299 CHECK_FCT_DO(fd_app_empty(&fd_g_config->cnf_apps ), ); | |
300 | |
301 /* Destroy the local identity */ | |
302 free(fd_g_config->cnf_diamid); fd_g_config->cnf_diamid = NULL; | |
303 free(fd_g_config->cnf_diamrlm); fd_g_config->cnf_diamrlm = NULL; | |
304 | |
305 return 0; | |
306 } | |
307 | |
308 |