Message ID | 20200716111445.64483-1-xiangxia.m.yue@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,ovs-dev,v1,1/2] dpctl: Fix memory leak in dpctl_dump_flows() | expand |
On 2020-07-16 2:14 PM, xiangxia.m.yue@gmail.com wrote: > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > Goto label accurately to avoid memleak. > > Fixes: a692410af0f7 ("dpctl: Expand the flow dump type filter") > Cc: Gavi Teitz <gavi@mellanox.com> > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> > --- > lib/dpctl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/dpctl.c b/lib/dpctl.c > index db2b1f8961aa..09ae97f25cf3 100644 > --- a/lib/dpctl.c > +++ b/lib/dpctl.c > @@ -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); > > Reviewed-by: Roi Dayan <roid@mellanox.com>
On Sun, Jul 19, 2020 at 11:48:35AM +0300, Roi Dayan wrote: > > > On 2020-07-16 2:14 PM, xiangxia.m.yue@gmail.com wrote: > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > > > Goto label accurately to avoid memleak. > > > > Fixes: a692410af0f7 ("dpctl: Expand the flow dump type filter") > > Cc: Gavi Teitz <gavi@mellanox.com> > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > --- > > lib/dpctl.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/dpctl.c b/lib/dpctl.c > > index db2b1f8961aa..09ae97f25cf3 100644 > > --- a/lib/dpctl.c > > +++ b/lib/dpctl.c > > @@ -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); > > > > > > Reviewed-by: Roi Dayan <roid@mellanox.com> Thanks, applied to master, 2.14, 13, 12, and 11. William > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff --git a/lib/dpctl.c b/lib/dpctl.c index db2b1f8961aa..09ae97f25cf3 100644 --- a/lib/dpctl.c +++ b/lib/dpctl.c @@ -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);