justincormack / ljsyscall

LuaJIT Unix syscall FFI
http://www.myriabit.com/ljsyscall/
Other
441 stars 54 forks source link

Close socket immediately after error in if_nametoindex() #188

Closed aperezdc closed 8 years ago

aperezdc commented 8 years ago

Immediately close the socket used internally by syscall.util.if_nametoindex(), right after the lower-level implementation call notifies of an error. This avoids letting the socket be garbage-collected later on.