Skip to content

Commit

Permalink
10785 ecc: NULL pointer errors
Browse files Browse the repository at this point in the history
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
tsoome committed Apr 19, 2019
1 parent 8a29215 commit 3ec3653
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usr/src/uts/common/crypto/io/ecc.c
Expand Up @@ -222,7 +222,7 @@ static crypto_provider_info_t ecc_prov_info = {
ecc_mech_info_tab
};

static crypto_kcf_provider_handle_t ecc_prov_handle = NULL;
static crypto_kcf_provider_handle_t ecc_prov_handle = 0;

static int ecc_sign_common(ecc_ctx_t *, crypto_data_t *, crypto_data_t *,
crypto_req_handle_t);
Expand Down Expand Up @@ -256,11 +256,11 @@ int
_fini(void)
{
/* Unregister from KCF if module is registered */
if (ecc_prov_handle != NULL) {
if (ecc_prov_handle != 0) {
if (crypto_unregister_provider(ecc_prov_handle))
return (EBUSY);

ecc_prov_handle = NULL;
ecc_prov_handle = 0;
}

return (mod_remove(&modlinkage));
Expand Down

0 comments on commit 3ec3653

Please sign in to comment.