mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-03 20:29:28 -05:00
clean up on exit because otherwise re-lex may not be possible
git-svn-id: file:///svn/unbound/trunk@1786 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
568253e4ff
commit
b422db1c80
2 changed files with 8 additions and 7 deletions
|
|
@ -67,6 +67,10 @@ static int sig_record_reload = 0;
|
|||
/** cleaner ssl memory freeup */
|
||||
static void* comp_meth = NULL;
|
||||
#endif
|
||||
#ifdef LEX_HAS_YYLEX_DESTROY
|
||||
/** remove buffers for parsing and init */
|
||||
void ub_c_lex_destroy(void);
|
||||
#endif
|
||||
|
||||
/** used when no other sighandling happens, so we don't die
|
||||
* when multiple signals in quick succession are sent to us.
|
||||
|
|
@ -507,6 +511,10 @@ daemon_delete(struct daemon* daemon)
|
|||
free(daemon->pidfile);
|
||||
free(daemon->env);
|
||||
free(daemon);
|
||||
#ifdef LEX_HAS_YYLEX_DESTROY
|
||||
/* lex cleanup */
|
||||
ub_c_lex_destroy();
|
||||
#endif
|
||||
/* libcrypto cleanup */
|
||||
#if HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
|
||||
sk_SSL_COMP_free(comp_meth);
|
||||
|
|
|
|||
|
|
@ -61,10 +61,6 @@ int ub_c_lex(void);
|
|||
int ub_c_wrap(void);
|
||||
/** print error with file and line number */
|
||||
void ub_c_error(const char *message);
|
||||
#ifdef LEX_HAS_YYLEX_DESTROY
|
||||
/** remove buffers for parsing and init */
|
||||
void ub_c_lex_destroy(void);
|
||||
#endif
|
||||
|
||||
/** init ports possible for use */
|
||||
static void init_outgoing_availports(int* array, int num);
|
||||
|
|
@ -477,9 +473,6 @@ config_read(struct config_file* cfg, const char* filename, const char* chroot)
|
|||
create_cfg_parser(cfg, fname, chroot);
|
||||
ub_c_in = in;
|
||||
ub_c_parse();
|
||||
#ifdef LEX_HAS_YYLEX_DESTROY
|
||||
ub_c_lex_destroy();
|
||||
#endif
|
||||
fclose(in);
|
||||
|
||||
if(cfg_parser->errors != 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue