Code

ssl utils: During shutdown, destroy mutexes as the last step.
authorSebastian Harl <sh@tokkee.org>
Mon, 16 Feb 2015 08:04:18 +0000 (09:04 +0100)
committerSebastian Harl <sh@tokkee.org>
Mon, 16 Feb 2015 08:04:18 +0000 (09:04 +0100)
Even ERR_free_strings() may call CRYPTO_lock.

src/utils/ssl.c

index 0bd41a3641766379a47d0ef14cc5ca4622219efe..c6a3fcb5e17df59b1050ca7c07aa8315068004ff 100644 (file)
@@ -244,14 +244,14 @@ sdb_ssl_shutdown(void)
 {
        int i;
 
+       ERR_free_strings();
+
        for (i = 0; i < mutexes_num; ++i)
                pthread_mutex_destroy(&mutexes[i]);
        if (mutexes)
                free(mutexes);
        mutexes = NULL;
        mutexes_num = 0;
-
-       ERR_free_strings();
 } /* sdb_ssl_shutdown */
 
 sdb_ssl_client_t *