diff options
author | Damijan Skvarc <damjan.skvarc@gmail.com> | 2020-01-22 15:06:43 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2020-01-22 21:05:58 +0100 |
commit | dbbd0cf64492426938c4ad3177cabb444b1e9163 (patch) | |
tree | e264f72b7c87c88b1b1efaf7dd357b0d8b3a7595 /ofproto | |
parent | 56c8027b5fd830a810f320a6ded6e8f8289e4fe6 (diff) | |
download | openvswitch-dbbd0cf64492426938c4ad3177cabb444b1e9163.tar.gz |
dpif: Fix memory leak while dumping dpif flows.
Leak was detected by running test: "ofproto-dpif - balance-tcp bonding"
Fixes: 0e8f5c6a38d0 ("dpif-netdev: Modified ovs-appctl dpctl/dump-flows command")
Signed-off-by: Damijan Skvarc <damjan.skvarc@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto-dpif.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index d3cb39207..ded170588 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -6282,6 +6282,9 @@ ofproto_unixctl_dpif_dump_flows(struct unixctl_conn *conn, while (dpif_flow_dump_next(flow_dump_thread, &f, 1)) { struct flow flow; + /* No need for extra info. */ + free(f.attrs.dp_extra_info); + if ((odp_flow_key_to_flow(f.key, f.key_len, &flow, NULL) == ODP_FIT_ERROR) || (xlate_lookup_ofproto(ofproto->backer, &flow, NULL, NULL) |