File 0672-crypto-Fix-mutex-memory-leak-at-unload.patch of Package erlang

From 62de22e98c5ab84d986ebd09f882c5d3df87121b Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Mon, 27 Sep 2021 20:57:12 +0200
Subject: [PATCH 1/2] crypto: Fix mutex memory leak at unload

---
 lib/crypto/c_src/algorithms.c | 2 --
 lib/crypto/c_src/algorithms.h | 1 +
 lib/crypto/c_src/crypto.c     | 3 ++-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/crypto/c_src/algorithms.c b/lib/crypto/c_src/algorithms.c
index aaad836869..5baa5b3c08 100644
--- a/lib/crypto/c_src/algorithms.c
+++ b/lib/crypto/c_src/algorithms.c
@@ -53,8 +53,6 @@ void init_algorithms_types(ErlNifEnv* env)
     /* ciphers and macs are initiated statically */
 }
 
-void cleanup_algorithms_types(ErlNifEnv* env);
-
 void cleanup_algorithms_types(ErlNifEnv* env)
 {
     enif_mutex_destroy(mtx_init_curve_types);
diff --git a/lib/crypto/c_src/algorithms.h b/lib/crypto/c_src/algorithms.h
index 60feefa482..dca6a5d7ce 100644
--- a/lib/crypto/c_src/algorithms.h
+++ b/lib/crypto/c_src/algorithms.h
@@ -24,6 +24,7 @@
 #include "common.h"
 
 void init_algorithms_types(ErlNifEnv* env);
+void cleanup_algorithms_types(ErlNifEnv* env);
 
 ERL_NIF_TERM hash_algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
 ERL_NIF_TERM pubkey_algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
-- 
2.31.1

openSUSE Build Service is sponsored by