Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2014 11:11:27 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r269925 - stable/10/sys/dev/iscsi
Message-ID:  <201408131111.s7DBBRUD062419@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Wed Aug 13 11:11:27 2014
New Revision: 269925
URL: http://svnweb.freebsd.org/changeset/base/269925

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

Modified:
  stable/10/sys/dev/iscsi/icl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/iscsi/icl.c
==============================================================================
--- stable/10/sys/dev/iscsi/icl.c	Wed Aug 13 09:34:33 2014	(r269924)
+++ stable/10/sys/dev/iscsi/icl.c	Wed Aug 13 11:11:27 2014	(r269925)
@@ -669,7 +669,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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408131111.s7DBBRUD062419>