Previously, RSA JWK import released its parameter values before
creating the EVP_PKEY. A failure in EVP_PKEY_new() or
EVP_PKEY_set1_RSA() then released the same values in error cleanup.
Reset released values so the error handler no longer owns them.
The issue was introduced in
75ca26f8 (0.8.10).
JS_FreeValue(cx, dp);
JS_FreeValue(cx, dq);
JS_FreeValue(cx, qi);
+ p = JS_UNDEFINED;
+ q = JS_UNDEFINED;
+ dp = JS_UNDEFINED;
+ dq = JS_UNDEFINED;
+ qi = JS_UNDEFINED;
done:
JS_FreeValue(cx, n);
JS_FreeValue(cx, e);
JS_FreeValue(cx, d);
+ n = JS_UNDEFINED;
+ e = JS_UNDEFINED;
+ d = JS_UNDEFINED;
pkey = EVP_PKEY_new();
if (pkey == NULL) {