[ovs-dev] [PATCH ovs-dev v1 1/2] dpctl: Fix memory leak in dpctl_dump_flows()
xiangxia.m.yue at gmail.com
xiangxia.m.yue at gmail.com
Thu Jul 16 11:14:44 UTC 2020
From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Goto label accurately to avoid memleak.
Fixes: a692410af0f7 ("dpctl: Expand the flow dump type filter")
Cc: Gavi Teitz <gavi at mellanox.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue at 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);
--
2.26.1
More information about the dev
mailing list