Ensure the WPACKET gets cleaned up in the event of an error

Otherwise a mem leak can occur.

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell 2016-09-08 10:00:56 +01:00
parent 871bc59bc1
commit 796a627e0a

View File

@ -875,6 +875,7 @@ int tls_construct_client_hello(SSL *s)
return 1;
err:
ossl_statem_set_error(s);
WPACKET_cleanup(&pkt);
return 0;
}