Commit 5295b99b authored by Benjamin Kaduk's avatar Benjamin Kaduk
Browse files

ecdsa_ossl: address coverity nit



BN_CTX_end() does not handle NULL input, so we must manually check
before calling from the cleanup handler.

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6502)
parent 09fb65d5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -336,6 +336,7 @@ ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
        ECDSA_SIG_free(ret);
        ret = NULL;
    }
    if (ctx != NULL)
        BN_CTX_end(ctx);
    BN_CTX_free(ctx);
    BN_clear_free(kinv);