Skip to content

Commit

Permalink
10784 aes: 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 aec38f6 commit 8a29215
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usr/src/uts/common/crypto/io/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static crypto_provider_info_t aes_prov_info = {
aes_mech_info_tab
};

static crypto_kcf_provider_handle_t aes_prov_handle = NULL;
static crypto_kcf_provider_handle_t aes_prov_handle = 0;
static crypto_data_t null_crypto_data = { CRYPTO_DATA_RAW };

int
Expand All @@ -244,11 +244,11 @@ int
_fini(void)
{
/* Unregister from KCF if module is registered */
if (aes_prov_handle != NULL) {
if (aes_prov_handle != 0) {
if (crypto_unregister_provider(aes_prov_handle))
return (EBUSY);

aes_prov_handle = NULL;
aes_prov_handle = 0;
}

return (mod_remove(&modlinkage));
Expand Down

0 comments on commit 8a29215

Please sign in to comment.