projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d4cd9d
)
Close socket if TCP connecting fails to avoid leaking sockets
silc.server.1.1.9
author
Pekka Riikonen
<priikone@silcnet.org>
Mon, 9 Jun 2008 05:26:01 +0000
(08:26 +0300)
committer
Pekka Riikonen
<priikone@silcnet.org>
Mon, 9 Jun 2008 05:26:01 +0000
(08:26 +0300)
lib/silcutil/unix/silcunixnet.c
patch
|
blob
|
history
diff --git
a/lib/silcutil/unix/silcunixnet.c
b/lib/silcutil/unix/silcunixnet.c
index daf9e1837a70dcf231e24002da1794df70452b20..2332672d4643d125180f7923315020246153c51c 100644
(file)
--- a/
lib/silcutil/unix/silcunixnet.c
+++ b/
lib/silcutil/unix/silcunixnet.c
@@
-701,6
+701,9
@@
SILC_FSM_STATE(silc_net_connect_st_finish)
silc_async_free(conn->op);
}
+ if (conn->sock && conn->status != SILC_NET_OK)
+ silc_net_close_connection(conn->sock);
+
return SILC_FSM_FINISH;
}