Skip to content

Commit

Permalink
dpif-netlink-rtnl: Fix netdev leak in out-of-tree tunnels probe.
Browse files Browse the repository at this point in the history
Caught by code review, calling netdev_open works in pair of netdev_close
when no reference to a netdev must be kept.

Fixes: 921c370 ("dpif-netlink: Probe for out-of-tree tunnels, decides used interface")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eric Garver <eric@garver.life>
Signed-off-by: Simon Horman <horms@ovn.org>
  • Loading branch information
david-marchand authored and Simon Horman committed Jul 17, 2024
1 parent d7fa3c3 commit f3d5ce5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/dpif-netlink-rtnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ dpif_netlink_rtnl_probe_oot_tunnels(void)

tnl_cfg = netdev_get_tunnel_config(netdev);
if (!tnl_cfg) {
netdev_close(netdev);
return true;
}

Expand Down

0 comments on commit f3d5ce5

Please sign in to comment.