Previously, failure to allocate the external CryptoKey object freed
an imported EVP_PKEY in the local error handler, then freed it again
when the VM memory pool ran the key cleanup.
Clear the local pointer when ownership passes to the key cleanup.
The issue was introduced in
50e7c9b2 (0.7.10).
key->hash = hash;
key->u.a.pkey = pkey;
+ pkey = NULL;
break;
}
key->u.a.pkey = pkey;
+ pkey = NULL;
break;
}
key->u.a.pkey = pkey;
+ pkey = NULL;
break;
}
key->u.a.pkey = pkey;
+ pkey = NULL;
break;
#endif