Skip to content

Commit

Permalink
dpif: Fix memory leak while dumping dpif flows.
Browse files Browse the repository at this point in the history
Leak was detected by running test: "ofproto-dpif - balance-tcp bonding"

Fixes: 0e8f5c6 ("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>
  • Loading branch information
damijans authored and igsilya committed Jan 22, 2020
1 parent 2a4f006 commit dbdf66c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ofproto/ofproto-dpif.c
Expand Up @@ -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)
Expand Down

0 comments on commit dbdf66c

Please sign in to comment.