free class->indexes in CRYPTO_cleanup_all_ex_data()
authortb <tb@openbsd.org>
Fri, 2 Aug 2024 14:02:33 +0000 (14:02 +0000)
committertb <tb@openbsd.org>
Fri, 2 Aug 2024 14:02:33 +0000 (14:02 +0000)
ok jsing

lib/libcrypto/crypto_ex_data.c

index 947e026..2b3e28f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto_ex_data.c,v 1.1 2024/08/02 10:48:54 jsing Exp $ */
+/* $OpenBSD: crypto_ex_data.c,v 1.2 2024/08/02 14:02:33 tb Exp $ */
 /*
  * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
  *
@@ -165,6 +165,7 @@ CRYPTO_cleanup_all_ex_data(void)
                if (class->indexes != NULL) {
                        for (j = 0; j < CRYPTO_EX_DATA_MAX_INDEX; j++)
                                free(class->indexes[j]);
+                       free(class->indexes);
                }
 
                free(class);