/*
- * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
goto err;
}
- if (ret <= 0) {
- cipher->freectx(ctx->op.ciph.ciphprovctx);
- ctx->op.ciph.ciphprovctx = NULL;
+ if (ret <= 0)
goto err;
- }
return 1;
legacy:
}
err:
- if (ret <= 0)
+ if (ret <= 0) {
+ evp_pkey_ctx_free_old_ops(ctx);
ctx->operation = EVP_PKEY_OP_UNDEFINED;
+ }
return ret;
}