app/testpmd: fix async action destruction leak
In case action handle destroy fails, the job memory was not freed
properly. This commit fixes the possible memory leak in the action
handle destruction failed case.
Fixes: c9dc038408
("ethdev: add indirect action async query")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
parent
7aa745d788
commit
c469b892a3
@ -2862,9 +2862,9 @@ port_queue_action_handle_destroy(portid_t port_id,
|
||||
job->type = QUEUE_JOB_TYPE_ACTION_DESTROY;
|
||||
job->pia = pia;
|
||||
|
||||
if (pia->handle &&
|
||||
rte_flow_async_action_handle_destroy(port_id,
|
||||
if (rte_flow_async_action_handle_destroy(port_id,
|
||||
queue_id, &attr, pia->handle, job, &error)) {
|
||||
free(job);
|
||||
ret = port_flow_complain(&error);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user