Don't clear errors after error strings initialization 86/72586/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 1 Jun 2016 15:01:08 +0000 (17:01 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 1 Jun 2016 15:36:42 +0000 (17:36 +0200)
Change-Id: Idc58cbd7e83916ba5298d366a8be1bffbe2761c2

src/debug.c

index ac7fe9a..13c0a9b 100644 (file)
@@ -87,13 +87,12 @@ void error_dump(const char *file, int line, const char *function, int code)
        while ((err = ERR_get_error()) != 0 && written < BUF_SIZE - 1) {
                if (!error_strings_loaded) {
                        /*
-                        * Both these functions are thread-safe as long as static locks are
-                        * installed according to doc so calling them twice won't break
+                        * This function is thread-safe as long as static locks are
+                        * installed according to doc so calling it twice won't break
                         * anything and I don't want to use synchronization mechanisms
                         * here.
                         */
                        ERR_load_crypto_strings();
-                       ERR_clear_error();
                        error_strings_loaded = true;
                }