From aa8d1792d147da3562fe9546da75523615434ef0 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Thu, 13 Nov 2014 03:59:36 +0000 Subject: [PATCH] iw_cxgbe: don't forget to close the socket in c4iw_connect if soconnect fails. Submitted by: hariprasad at chelsio dot com --- sys/dev/cxgbe/iw_cxgbe/cm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/iw_cxgbe/cm.c b/sys/dev/cxgbe/iw_cxgbe/cm.c index 4702e19a586..dc6aef77e80 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: