On Fri, Mar 01, 2019 at 03:08:48PM +0800, Hangbin Liu wrote:
> +static int get_team_active_iface(int master_index)
> +{
> + struct rtattr *tb[TEAM_ATTR_MAX+1];
> + struct genlmsghdr *gnlh;
> + struct nlmsghdr *nlh;
> + char msg[BUF_SIZE];
> + int fd, gf_id, len;
> + int index = -1;
> +
> + fd = nl_open(NETLINK_GENERIC);
> + if (fd < 0)
> + return fd;
...
> + return index;
> +no_info:
> + nl_close(fd);
> + return -1;
> }
This seems to leak the file descriptor.
--
Miroslav Lichvar
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel