app/flow-perf: fix memory leak from RSS action
authorWisam Jaddo <wisamm@mellanox.com>
Sun, 30 Aug 2020 11:15:37 +0000 (11:15 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:10 +0000 (18:55 +0200)
commitb777d9d0466e542ade55ee421cbeb5e18814867e
tree08e8ab09f6cee61ddff37477b858a33f383c91b0
parentd71bc9e99cbfc9b40382be0f771dfe81cc46ecb8
app/flow-perf: fix memory leak from RSS action

Currently, each call for add_rss_action will allocate
extra memory for rss_data, which will reflect bad results
on memory consumption for all flows, and will leads into
memory leak.

In this fix, it will check if it's allocated before
reallocating it.

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
app/test-flow-perf/actions_gen.c