make reinitialisation work for CMAC
[oweals/openssl.git] / crypto / mem.c
index 6f80dd33eb740a3822390bae39a40fa7d40d1e80..8f736c3b1f527d482c941d998447cdf1657cfa6d 100644 (file)
@@ -125,6 +125,7 @@ static long (*get_debug_options_func)(void) = NULL;
 int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t),
        void (*f)(void *))
        {
+       OPENSSL_init();
        if (!allow_customize)
                return 0;
        if ((m == 0) || (r == 0) || (f == 0))
@@ -186,6 +187,7 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
        {
        if (!allow_customize_debug)
                return 0;
+       OPENSSL_init();
        malloc_debug_func=m;
        realloc_debug_func=r;
        free_debug_func=f;