[ovs-git] [openvswitch/ovs] 666602: dpif-netlink: Free leaked nl_sock
yifsun
noreply at github.com
Mon Oct 14 18:23:04 UTC 2019
Branch: refs/heads/master
Home: https://github.com/openvswitch/ovs
Commit: 666602ada7d80dfc36496419742f6de9dcc116a4
https://github.com/openvswitch/ovs/commit/666602ada7d80dfc36496419742f6de9dcc116a4
Author: Yifeng Sun <pkusunyifeng at gmail.com>
Date: 2019-10-14 (Mon, 14 Oct 2019)
Changed paths:
M lib/dpif-netlink.c
Log Message:
-----------
dpif-netlink: Free leaked nl_sock
Valgrind reports:
20 bytes in 1 blocks are definitely lost in loss record 94 of 353
by 0x532594: xmalloc (util.c:138)
by 0x553EAD: nl_sock_create (netlink-socket.c:146)
by 0x54331D: create_nl_sock (dpif-netlink.c:255)
by 0x54331D: dpif_netlink_port_add__ (dpif-netlink.c:756)
by 0x5435F6: dpif_netlink_port_add_compat (dpif-netlink.c:876)
by 0x5435F6: dpif_netlink_port_add (dpif-netlink.c:922)
by 0x47EC1D: dpif_port_add (dpif.c:584)
by 0x42B35F: port_add (ofproto-dpif.c:3721)
by 0x41E64A: ofproto_port_add (ofproto.c:2032)
by 0x40B3FE: iface_do_create (bridge.c:1817)
by 0x40B3FE: iface_create (bridge.c:1855)
by 0x40B3FE: bridge_add_ports__ (bridge.c:943)
by 0x40D14A: bridge_add_ports (bridge.c:959)
by 0x40D14A: bridge_reconfigure (bridge.c:673)
by 0x410D75: bridge_run (bridge.c:3050)
by 0x407614: main (ovs-vswitchd.c:127)
This leak is because when vport_add_channel() returns 0, it is expected
to take the ownership of 'socksp'. This patch fixes this issue.
Signed-off-by: Yifeng Sun <pkusunyifeng at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>
More information about the git
mailing list