]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
init_tcp_socket: close socket fd on errors
authorAndre <maan@p133.(none)>
Thu, 15 Jun 2006 06:06:44 +0000 (08:06 +0200)
committerAndre <maan@p133.(none)>
Thu, 15 Jun 2006 06:06:44 +0000 (08:06 +0200)
The current code may leak the fd if bind fails, for example.  This is
a benign bug however, since all paraslash applications that call
init_tcp_socket() terminate on errors anyway.

But it is no good idea to rely on this, so close the fd on errors.

This patch also gets rid of the do_bind() one-liner which was only
called from init_tcp_socket().


No differences found