From owner-svn-src-all@FreeBSD.ORG Mon Jul 28 21:14:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52E61ED7; Mon, 28 Jul 2014 21:14:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 409602473; Mon, 28 Jul 2014 21:14:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6SLEgea005914; Mon, 28 Jul 2014 21:14:42 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s6SLEgn8005913; Mon, 28 Jul 2014 21:14:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201407282114.s6SLEgn8005913@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 28 Jul 2014 21:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269197 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2014 21:14:42 -0000 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); }