swanctl: Clear config from memory
The 'secrets' section in the config file may contain passwords/PINs.
This commit is contained in:
@@ -86,7 +86,7 @@ static int load_all(vici_conn_t *conn)
|
|||||||
ret = load_conns_cfg(conn, format, cfg);
|
ret = load_conns_cfg(conn, format, cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg->destroy(cfg);
|
cfg->destroy_clear(cfg);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ static int load_authorities(vici_conn_t *conn)
|
|||||||
|
|
||||||
ret = load_authorities_cfg(conn, format, cfg);
|
ret = load_authorities_cfg(conn, format, cfg);
|
||||||
|
|
||||||
cfg->destroy(cfg);
|
cfg->destroy_clear(cfg);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ static int load_conns(vici_conn_t *conn)
|
|||||||
|
|
||||||
ret = load_conns_cfg(conn, format, cfg);
|
ret = load_conns_cfg(conn, format, cfg);
|
||||||
|
|
||||||
cfg->destroy(cfg);
|
cfg->destroy_clear(cfg);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -990,7 +990,7 @@ static int load_creds(vici_conn_t *conn)
|
|||||||
|
|
||||||
ret = load_creds_cfg(conn, format, cfg, clear, noprompt);
|
ret = load_creds_cfg(conn, format, cfg, clear, noprompt);
|
||||||
|
|
||||||
cfg->destroy(cfg);
|
cfg->destroy_clear(cfg);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ static int load_pools(vici_conn_t *conn)
|
|||||||
|
|
||||||
ret = load_pools_cfg(conn, format, cfg);
|
ret = load_pools_cfg(conn, format, cfg);
|
||||||
|
|
||||||
cfg->destroy(cfg);
|
cfg->destroy_clear(cfg);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user