diff options
author | Jack Lloyd <[email protected]> | 2017-09-03 07:58:19 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-03 07:58:19 -0400 |
commit | 776e1a2f80c03bedf94a6a7665680c0d794f1073 (patch) | |
tree | aec0eb4bc93c7ef79c144c91ec1bfd4105ebcc0b | |
parent | 31b0a9094a0a182d4a1fcbe1ec7c301b3950e941 (diff) |
Avoid leaking address info in the case of a connection failure
Not really a problem since we're exiting shortly afterwards.
[ci skip]
-rw-r--r-- | src/cli/tls_client.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/tls_client.cpp b/src/cli/tls_client.cpp index 2e690feab..1379b49be 100644 --- a/src/cli/tls_client.cpp +++ b/src/cli/tls_client.cpp @@ -308,13 +308,13 @@ class TLS_Client final : public Command, public Botan::TLS::Callbacks break; } + ::freeaddrinfo(res); + if(rp == nullptr) // no address succeeded { throw CLI_Error("connect failed"); } - ::freeaddrinfo(res); - return fd; } |