summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2014-11-13 03:59:36 +0000
committernp <np@FreeBSD.org>2014-11-13 03:59:36 +0000
commit1b8851194e5ad9c738a2b0f5b17949b48b3644ff (patch)
treec54abfe2db82cc25e393bf44193a9da6f4704801
parent18e43996ed42ace1467606199ad084a5cea9f6da (diff)
downloadFreeBSD-src-1b8851194e5ad9c738a2b0f5b17949b48b3644ff.zip
FreeBSD-src-1b8851194e5ad9c738a2b0f5b17949b48b3644ff.tar.gz
iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect
fails. Submitted by: hariprasad at chelsio dot com
-rw-r--r--sys/dev/cxgbe/iw_cxgbe/cm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/cxgbe/iw_cxgbe/cm.c b/sys/dev/cxgbe/iw_cxgbe/cm.c
index 4702e19..dc6aef7 100644
--- a/sys/dev/cxgbe/iw_cxgbe/cm.c
+++ b/sys/dev/cxgbe/iw_cxgbe/cm.c
@@ -2114,9 +2114,11 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
ep->com.thread);
if (!err) {
-
CTR2(KTR_IW_CXGBE, "%s:cca %p", __func__, ep);
goto out;
+ } else {
+ close_socket(&ep->com, 0);
+ goto fail2;
}
fail3:
OpenPOWER on IntegriCloud