From febb0afaef47ed74b2bdbde0b4278263390f4185 Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Sun, 5 Mar 2017 21:00:11 +0100 Subject: [PATCH] Fix double free in cookie generation. Reviewed-by: Rich Salz Reviewed-by: Matt Caswell GH: #2850 --- ssl/statem/extensions_clnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c index 23dc8d3363..8860462a1f 100644 --- a/ssl/statem/extensions_clnt.c +++ b/ssl/statem/extensions_clnt.c @@ -658,6 +658,7 @@ int tls_construct_ctos_cookie(SSL *s, WPACKET *pkt, unsigned int context, ret = 1; end: OPENSSL_free(s->ext.tls13_cookie); + s->ext.tls13_cookie = NULL; s->ext.tls13_cookie_len = 0; return ret; -- 2.25.1