Re: [Openvpn-devel] [PATCH] Add missing check for nl_socket_alloc failure

2023-03-20 Thread Arne Schwabe
Am 14.02.23 um 15:01 schrieb Gert Doering: Hi, On Tue, Feb 14, 2023 at 02:56:58PM +0100, Arne Schwabe wrote: resolve_ovpn_netlink_id(int msglevel) { -int ret; struct nl_sock *nl_sock = nl_socket_alloc(); -ret = genl_connect(nl_sock); +if (!nl_sock) +{ +msg(

Re: [Openvpn-devel] [PATCH] Add missing check for nl_socket_alloc failure

2023-02-14 Thread Gert Doering
Hi, On Tue, Feb 14, 2023 at 02:56:58PM +0100, Arne Schwabe wrote: > resolve_ovpn_netlink_id(int msglevel) > { > -int ret; > struct nl_sock *nl_sock = nl_socket_alloc(); > > -ret = genl_connect(nl_sock); > +if (!nl_sock) > +{ > +msg(msglevel, "Allocating net link so