From: Andre Date: Thu, 15 Jun 2006 06:06:44 +0000 (+0200) Subject: init_tcp_socket: close socket fd on errors X-Git-Tag: v0.2.14~62^2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=0b976cff31e330df80b7a278d5f9d3a0615a644c;hp=0b976cff31e330df80b7a278d5f9d3a0615a644c;ds=sidebyside init_tcp_socket: close socket fd on errors 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(). ---