Skip to content

Commit

Permalink
dpctl: Fix memory leak in dpctl_dump_flows()
Browse files Browse the repository at this point in the history
Goto label accurately to avoid memleak.

Fixes: a692410 ("dpctl: Expand the flow dump type filter")
Cc: Gavi Teitz <gavi@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
  • Loading branch information
xpu22 authored and williamtu committed Jul 21, 2020
1 parent 224f4ba commit 0f7fcf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dpctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ dpctl_dump_flows(int argc, const char *argv[], struct dpctl_params *dpctl_p)
memset(&dump_types, 0, sizeof dump_types);
error = populate_dump_types(types_list, &dump_types, dpctl_p);
if (error) {
goto out_free;
goto out_dpifclose;
}
determine_dpif_flow_dump_types(&dump_types, &dpif_dump_types);

Expand Down

0 comments on commit 0f7fcf1

Please sign in to comment.