make sure error queue is totally emptied
[openssl.git] / crypto / objects / obj_dat.c
index 700a0b6d3c04d615820f651cc05ce1978ec8304b..e56f3dea09a955f03efbf9b48435874f1b140f1e 100644 (file)
@@ -414,7 +414,7 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name)
        i=a2d_ASN1_OBJECT(NULL,0,s,-1);
        if (i <= 0) {
                /* Clear the error */
-               ERR_get_error();
+               ERR_clear_error();
                return NULL;
        }
        /* Work out total size */