SLPBroadcast/MulticastSend socket file desriptor leak
Brought to you by:
jcalcote
If an error occurs in the main for loop in SLPBroadcastSend() and SLPMulticastSend() after the socket is created, socks->sock_count will NOT get incremented since the error causes a premature exit from the loop (and function).
The result is that sock_count will be incorrect (one less than it should be) and the last opened socket will not get closed in SLPXcastSocketsClose().
Suggest replacing with while loop and increment socks->sock_count immediately after the socket is created.
Kenny Bunch
kenny@wasabisystems.com
Logged In: NO
Note that socks->sock_count is used throughout the function, so a local sock_count var may be required to avoid additional code rework. -Kenny
Logged In: NO
Note that socks->sock_count is used throughout the function, so a local sock_count var may be required to avoid additional code rework. -Kenny