fixed the longstanding myids memory leak
This commit is contained in:
parent
6319cd74ea
commit
af8ab6861d
|
@ -66,6 +66,21 @@ init_id(void)
|
|||
set_myFQDN();
|
||||
}
|
||||
|
||||
/*
|
||||
* free id module
|
||||
*/
|
||||
void
|
||||
free_id(void)
|
||||
{
|
||||
enum myid_state s;
|
||||
|
||||
for (s = MYID_UNKNOWN; s <= MYID_SPECIFIED; s++)
|
||||
{
|
||||
free_id_content(&myids[s]);
|
||||
free(myid_str[s]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
calc_myid_str(enum myid_state s)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ struct id {
|
|||
};
|
||||
|
||||
extern void init_id(void);
|
||||
|
||||
extern void free_id(void);
|
||||
extern const struct id empty_id; /* ID_NONE */
|
||||
|
||||
enum myid_state {
|
||||
|
|
|
@ -707,6 +707,7 @@ exit_pluto(int status)
|
|||
stop_adns();
|
||||
free_md_pool();
|
||||
free_crypto();
|
||||
free_id();
|
||||
delete_lock();
|
||||
library_deinit();
|
||||
close_log();
|
||||
|
|
Loading…
Reference in New Issue