Clear alpn_selected_len for clients, too
Zero out the length alongside the NULLing of the pointer, to
bring parity between the selected and proposed fields..
@@ -875,8 +875,8 @@ static int init_alpn(SSL *s, unsigned int context)
{
OPENSSL_free(s->s3->alpn_selected);
s->s3->alpn_selected = NULL;
- if (s->server) {
s->s3->alpn_selected_len = 0;
+ if (s->server) {
OPENSSL_free(s->s3->alpn_proposed);
s->s3->alpn_proposed = NULL;
s->s3->alpn_proposed_len = 0;
