Prevent potential socket file descriptor leak
Prevent potential socket file descriptor leak

This may happen when passing connected socket to nl_cache_mngr_alloc().

Now, nl_connect() will return error trying to connect already connected socket.

Also, dont call close(-1) if socket() fails.

honsys/libnl,tgraf/libnl,claudelee/libnl,honsys/libnl,tgraf/libnl,mshirley/libnl,cfriedt/libnl,baloo/libnl,chitranshi/libnl,claudelee/libnl,greearb/libnl-ct,dsahern/libnl,teto/libnl_old,HolyShitMan/libnl-1,Distrotech/libnl,UnicronNL/libnl3,dsahern/libnl,vyos/libnl3,teto/libnl_old,houstar/libnl,tgraf/libnl,kolyshkin/libnl,vyos/libnl3,baloo/libnl,chitranshi/libnl,thom311/libnl,cyclops8456/libnl3,tklauser/libnl,cfriedt/libnl,Distrotech/libnl,Distrotech/libnl,greearb/libnl-ct,karlhiramoto/libnl,mshirley/libnl,baloo/libnl,tklauser/libnl,kolyshkin/libnl,vyos/libnl3,kolyshkin/libnl,congwang/libnl,tgraf/libnl,baloo/libnl,houstar/libnl,UnicronNL/libnl3,Distrotech/libnl,teto/libnl_old,HolyShitMan/libnl-1,cyclops8456/libnl3,cfriedt/libnl,honsys/libnl,cyclops8456/libnl3,claudelee/libnl,chitranshi/libnl,cyclops8456/libnl3,congwang/libnl,congwang/libnl,UnicronNL/libnl3,honsys/libnl,thom311/libnl,claudelee/libnl,vyos/libnl3,UnicronNL/libnl3,houstar/libnl,greearb/libnl-ct,karlhiramoto/libnl,mshirley/libnl,teto/libnl_old,mshirley/libnl,HolyShitMan/libnl-1,cfriedt/libnl,congwang/libnl,dsahern/libnl,houstar/libnl,karlhiramoto/libnl,tklauser/libnl,HolyShitMan/libnl-1,thom311/libnl,karlhiramoto/libnl,dsahern/libnl,tklauser/libnl,kolyshkin/libnl,chitranshi/libnl