Skip to content

Commit

Permalink
10787 rsa: 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 b5083b9 commit b4a44cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usr/src/uts/common/crypto/io/rsa.c
Expand Up @@ -318,7 +318,7 @@ static int compare_data(crypto_data_t *, uchar_t *);
static int core_rsa_encrypt(crypto_key_t *, uchar_t *, int, uchar_t *, int);
static int core_rsa_decrypt(crypto_key_t *, uchar_t *, int, uchar_t *);

static crypto_kcf_provider_handle_t rsa_prov_handle = NULL;
static crypto_kcf_provider_handle_t rsa_prov_handle = 0;

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

rsa_prov_handle = NULL;
rsa_prov_handle = 0;
}

return (mod_remove(&modlinkage));
Expand Down

0 comments on commit b4a44cf

Please sign in to comment.