svn commit: r269197 - head/sys/dev/iscsi

Edward Tomasz Napierala trasz at FreeBSD.org
Mon Jul 28 21:14:42 UTC 2014


Author: trasz
Date: Mon Jul 28 21:14:41 2014
New Revision: 269197
URL: http://svnweb.freebsd.org/changeset/base/269197

Log:
  Fix potential double free that could happen after connection error.
  
  MFC after:	3 days

Modified:
  head/sys/dev/iscsi/icl.c

Modified: head/sys/dev/iscsi/icl.c
==============================================================================
--- head/sys/dev/iscsi/icl.c	Mon Jul 28 21:11:18 2014	(r269196)
+++ head/sys/dev/iscsi/icl.c	Mon Jul 28 21:14:41 2014	(r269197)
@@ -664,7 +664,10 @@ icl_conn_receive_pdu(struct icl_conn *ic
 	}
 
 	if (error != 0) {
-		icl_pdu_free(request);
+		/*
+		 * Don't free the PDU; it's pointed to by ic->ic_receive_pdu
+		 * and will get freed in icl_conn_close().
+		 */
 		icl_conn_fail(ic);
 	}
 


More information about the svn-src-all mailing list