Call OPENSSL_init after we've checked to see if customisation is permissible.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 14 Nov 2011 14:15:29 +0000 (14:15 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 14 Nov 2011 14:15:29 +0000 (14:15 +0000)
crypto/mem.c

index 46a4e6c6dd8a210da5003003153e2f3045c57c08..8f736c3b1f527d482c941d998447cdf1657cfa6d 100644 (file)
@@ -185,9 +185,9 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
                                   void (*so)(long),
                                   long (*go)(void))
        {
-       OPENSSL_init();
        if (!allow_customize_debug)
                return 0;
+       OPENSSL_init();
        malloc_debug_func=m;
        realloc_debug_func=r;
        free_debug_func=f;