Skip to content

Commit

Permalink
dpif-netdev: fix memory leak in dpcls subtable set command
Browse files Browse the repository at this point in the history
This patch fixes a memory leak when the command
"dpif-netdev/subtable-lookup-prio-set" is run, the pmd_list
required to iterate the PMD threads was not being freed.
This issue was identified by a static analysis tool.

Fixes: 3d018c3 ("dpif-netdev: Add subtable lookup prio set command.")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
  • Loading branch information
harry-van-haaren authored and istokes committed Aug 16, 2021
1 parent 580e794 commit 7f71602
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/dpif-netdev.c
Expand Up @@ -994,6 +994,7 @@ dpif_netdev_subtable_lookup_set(struct unixctl_conn *conn, int argc OVS_UNUSED,

/* release port mutex before netdev mutex. */
ovs_mutex_unlock(&dp->port_mutex);
free(pmd_list);
}
ovs_mutex_unlock(&dp_netdev_mutex);

Expand Down

0 comments on commit 7f71602

Please sign in to comment.