Skip to content

Commit

Permalink
net/softnic: fix memory leak as profile is freed
Browse files Browse the repository at this point in the history
[ upstream commit b3bc560 ]

In function softnic_table_action_profile_free(), the memory referenced
by pointer "ap" in the instance of "struct softnic_table_action_profile"
is not freed.

This patch fixes it.

Fixes: a737dd4 ("net/softnic: add table action profile")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
  • Loading branch information
yudapengx authored and bluca committed Aug 3, 2021
1 parent c3e2390 commit 3a0ced6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/softnic/rte_eth_softnic_action.c
Expand Up @@ -183,6 +183,7 @@ softnic_table_action_profile_free(struct pmd_internals *p)
break;

TAILQ_REMOVE(&p->table_action_profile_list, profile, node);
rte_table_action_profile_free(profile->ap);
free(profile);
}
}
Expand Down

0 comments on commit 3a0ced6

Please sign in to comment.