Otherwise we get a memory leak.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2326)
rv = rv && tls13_generate_handshake_secret(s, pms, pmslen);
} else {
- /* Generate master secret and discard premaster */
- rv = ssl_generate_master_secret(s, pms, pmslen, 1);
+ rv = ssl_generate_master_secret(s, pms, pmslen, 0);
}
- pms = NULL;
} else {
/* Save premaster secret */
s->s3->tmp.pms = pms;