]> granicus.if.org Git - transmission/commitdiff
(trunk libT) #5318: 'socket leak when bind() fails': fixed.
authorJordan Lee <jordan@transmissionbt.com>
Sat, 13 Apr 2013 19:34:34 +0000 (19:34 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sat, 13 Apr 2013 19:34:34 +0000 (19:34 +0000)
libtransmission/net.c

index 598bdf863aac394186b731a8c70de54359570135..8052c23bf397681408bab6c75886bfbfcd28c83c 100644 (file)
@@ -268,6 +268,7 @@ tr_netOpenPeerSocket (tr_session        * session,
     {
         tr_logAddError (_("Couldn't set source address %s on %d: %s"),
                 tr_address_to_string (source_addr), s, tr_strerror (errno));
+        tr_netClose (session, s);
         return -errno;
     }