Fix memory leaks in LEDAkem

This commit is contained in:
Thom Wiggers 2020-02-19 14:56:02 -05:00 committed by Kris Kwiatkowski
부모 0912b1821c
커밋 d8c9c431cf
3개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제

파일 보기

@ -81,7 +81,7 @@ int PQCLEAN_LEDAKEMLT12_LEAKTIME_seedexpander(AES_XOF_struct *ctx, uint8_t *x, s
memcpy(x + offset, ctx->buffer + ctx->buffer_pos, xlen);
ctx->buffer_pos += xlen;
return RNG_SUCCESS;
goto end;
}
// take what's in the buffer
@ -103,7 +103,8 @@ int PQCLEAN_LEDAKEMLT12_LEAKTIME_seedexpander(AES_XOF_struct *ctx, uint8_t *x, s
}
}
aes256_ctx_release(&ctx256);
end:
aes256_ctx_release(&ctx256);
return RNG_SUCCESS;
}

파일 보기

@ -81,7 +81,7 @@ int PQCLEAN_LEDAKEMLT32_LEAKTIME_seedexpander(AES_XOF_struct *ctx, uint8_t *x, s
memcpy(x + offset, ctx->buffer + ctx->buffer_pos, xlen);
ctx->buffer_pos += xlen;
return RNG_SUCCESS;
goto end;
}
// take what's in the buffer
@ -103,6 +103,7 @@ int PQCLEAN_LEDAKEMLT32_LEAKTIME_seedexpander(AES_XOF_struct *ctx, uint8_t *x, s
}
}
end:
aes256_ctx_release(&ctx256);
return RNG_SUCCESS;

파일 보기

@ -81,7 +81,7 @@ int PQCLEAN_LEDAKEMLT52_LEAKTIME_seedexpander(AES_XOF_struct *ctx, uint8_t *x, s
memcpy(x + offset, ctx->buffer + ctx->buffer_pos, xlen);
ctx->buffer_pos += xlen;
return RNG_SUCCESS;
goto end;
}
// take what's in the buffer
@ -103,6 +103,7 @@ int PQCLEAN_LEDAKEMLT52_LEAKTIME_seedexpander(AES_XOF_struct *ctx, uint8_t *x, s
}
}
end:
aes256_ctx_release(&ctx256);
return RNG_SUCCESS;