diff options
author | Pauli <paul.dale@oracle.com> | 2020-09-14 07:47:26 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-09-16 07:22:43 +1000 |
commit | 871881856fa1da2c175b17c52f6b0b1c15d791a1 (patch) | |
tree | d2ca7aadbe023e9adf95c4e26daed2db8144b27d /apps/lib | |
parent | 30f3b4e1c15cda063ed3e5ffc893b202afd671a3 (diff) | |
download | openssl-871881856fa1da2c175b17c52f6b0b1c15d791a1.tar.gz |
generate_cookie_callback: free temporary memory on an error path
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/12870)
Diffstat (limited to 'apps/lib')
-rw-r--r-- | apps/lib/s_cb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/lib/s_cb.c b/apps/lib/s_cb.c index ec52cef158..72fb98402d 100644 --- a/apps/lib/s_cb.c +++ b/apps/lib/s_cb.c @@ -786,6 +786,7 @@ int generate_cookie_callback(SSL *ssl, unsigned char *cookie, /* Create buffer with peer's address and port */ if (!BIO_ADDR_rawaddress(peer, NULL, &length)) { BIO_printf(bio_err, "Failed getting peer address\n"); + BIO_ADDR_free(lpeer); return 0; } OPENSSL_assert(length != 0); |