X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=hfal%2Fhfal-hmac.c;h=f27105592998d7b24d3933b26b7334538c9842aa;hb=7390f9235d6bc08b7fe34a5f43a04bd3b58f6ea6;hp=6f5fbf9bc7c32ae546b9f4fce960ffca70a2d43e;hpb=b9d6e1eb867eaa431c4c555a7409342805fa2706;p=arm-crypto-lib.git diff --git a/hfal/hfal-hmac.c b/hfal/hfal-hmac.c index 6f5fbf9..f271055 100644 --- a/hfal/hfal-hmac.c +++ b/hfal/hfal-hmac.c @@ -78,6 +78,7 @@ uint8_t hfal_hmac_ctxcopy(hfhmacgen_ctx_t* dest, hfhmacgen_ctx_t* src){ memcpy(dest->ctx, src->ctx, dest->desc->ctxsize_B); dest->finctx = malloc(dest->desc->ctxsize_B); if(dest->finctx == NULL){ + free(dest->ctx); return 1; } memcpy(dest->finctx, src->finctx, dest->desc->ctxsize_B);