ctx->desc = hash_descriptor;
ctx->ctx = malloc(hash_descriptor->ctxsize_B);
ctx->finctx = malloc(hash_descriptor->ctxsize_B);
- if(ctx->ctx==NULL && ctx->finctx==NULL)
+ if(ctx->ctx == NULL && ctx->finctx == NULL)
return 3;
- if(ctx->finctx==NULL){
+ if(ctx->finctx == NULL){
free(ctx->ctx);
return 2;
}
- if(ctx->ctx==NULL){
+ if(ctx->ctx == NULL){
free(ctx->finctx);
return 1;
}
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);