Fix memory leak in setup_outgoing_connection
Do not allocate new configuration for outgoing connection if it's already initialized.
This commit is contained in:
parent
1f2e14df8c
commit
5cb5ab3412
1 changed files with 5 additions and 3 deletions
|
@ -609,9 +609,11 @@ void setup_outgoing_connection(outgoing_t *outgoing) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!outgoing->config_tree) {
|
||||
init_configuration(&outgoing->config_tree);
|
||||
read_host_config(outgoing->config_tree, outgoing->name);
|
||||
outgoing->cfg = lookup_config(outgoing->config_tree, "Address");
|
||||
}
|
||||
|
||||
if(!outgoing->cfg) {
|
||||
if(n)
|
||||
|
|
Loading…
Reference in a new issue