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 <[email protected]>
Acked-by: Eric Garver <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
david-marchand authored and Simon Horman committed Jul 17, 2024
1 parent 0aa14d9 commit a276e24
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 @@ -566,6 +566,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 a276e24

Please sign in to comment.