mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
swanctl: Fix memory leak in --load-creds if --clear fails
This commit is contained in:
parent
938f6d3777
commit
e6b9f82a87
@ -903,6 +903,8 @@ int load_creds_cfg(vici_conn_t *conn, command_format_options_t format,
|
|||||||
{
|
{
|
||||||
if (!clear_creds(conn, format))
|
if (!clear_creds(conn, format))
|
||||||
{
|
{
|
||||||
|
ctx.keys->destroy_function(ctx.keys, (void*)free);
|
||||||
|
ctx.shared->destroy_function(ctx.shared, (void*)free);
|
||||||
return ECONNREFUSED;
|
return ECONNREFUSED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user