Removing -tls1 moved some tests from the legacy stack to the TLSv1.3 stack.
On a HRR, the alpn callback would be called twice and allocate the global
twice, thereby leaking. So free it up front.
Joint suffering with bcook and beck
-/* $OpenBSD: ssltest.c,v 1.40 2023/07/02 17:21:32 beck Exp $ */
+/* $OpenBSD: ssltest.c,v 1.41 2023/07/04 08:47:01 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* Make a copy of the selected protocol which will be freed in
* verify_alpn.
*/
+ free(alpn_selected);
if ((alpn_selected = malloc(*outlen)) == NULL) {
fprintf(stderr, "malloc failed\n");
abort();