Date: Mon, 28 Jul 2014 21:14:42 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269197 - head/sys/dev/iscsi Message-ID: <201407282114.s6SLEgn8005913@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407282114.s6SLEgn8005913>