Skip to content

Commit

Permalink
examples/fips_validation: remove unused allocation
Browse files Browse the repository at this point in the history
[ upstream commit 25d392e ]

The val.val pointer is allocated memory, however this memory is then
freed in get_writeback_data() without being used beforehand.
The pointer is then allocated memory again before use,
so the very first allocation is removed as it was unnecessary.

Fixes: f4797ba ("examples/fips_validation: support plain SHA")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
  • Loading branch information
ciarapow authored and cpaelzer committed Nov 30, 2021
1 parent 0b9f46c commit 6882449
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion examples/fips_validation/main.c
Expand Up @@ -1373,7 +1373,6 @@ fips_mct_sha_test(void)
int ret;
uint32_t i, j;

val.val = rte_malloc(NULL, (MAX_DIGEST_SIZE*SHA_MD_BLOCK), 0);
for (i = 0; i < SHA_MD_BLOCK; i++)
md[i].val = rte_malloc(NULL, (MAX_DIGEST_SIZE*2), 0);

Expand Down

0 comments on commit 6882449

Please sign in to comment.