examples/fips_validation: remove unused allocation
authorCiara Power <ciara.power@intel.com>
Thu, 12 Aug 2021 14:24:34 +0000 (14:24 +0000)
committerAkhil Goyal <gakhil@marvell.com>
Fri, 8 Oct 2021 19:31:07 +0000 (21:31 +0200)
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: f4797bae0050 ("examples/fips_validation: support plain SHA")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
examples/fips_validation/main.c

index a8daad1..c0e68b8 100644 (file)
@@ -1632,7 +1632,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);