Fix double frees.
[openssl.git] / crypto / cmac / cm_pmeth.c
index 585fc8e4bb7266baac3d25949c863fcb29ef92aa..072228ec7fa4d4e66d016e77c1f17da3efcb6d1f 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com).  This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
  */
 
 #include <stdio.h>
@@ -138,7 +133,7 @@ static int pkey_cmac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
                break;
 
                case EVP_PKEY_CTRL_CIPHER:
-               if (!CMAC_Init(cmctx, NULL, 0, p2, NULL))
+               if (!CMAC_Init(cmctx, NULL, 0, p2, ctx->engine))
                        return 0;
                break;