From owner-svn-src-all@FreeBSD.ORG Thu Oct 22 06:13:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EC751065672; Thu, 22 Oct 2009 06:13:08 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DC118FC24; Thu, 22 Oct 2009 06:13:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9M6D7ZC020886; Thu, 22 Oct 2009 06:13:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9M6D7LK020884; Thu, 22 Oct 2009 06:13:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910220613.n9M6D7LK020884@svn.freebsd.org> From: Christian Brueffer Date: Thu, 22 Oct 2009 06:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198356 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 22 Oct 2009 06:13:08 -0000 Author: brueffer Date: Thu Oct 22 06:13:07 2009 New Revision: 198356 URL: http://svn.freebsd.org/changeset/base/198356 Log: Fix a memory leak in an error case. PR: 138376 Submitted by: Patroklos Argyroudis Reviewed by: scottl MFC after: 1 week Modified: head/sys/cam/scsi/scsi_low.c Modified: head/sys/cam/scsi/scsi_low.c ============================================================================== --- head/sys/cam/scsi/scsi_low.c Thu Oct 22 04:35:32 2009 (r198355) +++ head/sys/cam/scsi/scsi_low.c Thu Oct 22 06:13:07 2009 (r198356) @@ -638,7 +638,10 @@ scsi_low_attach_xs(slp) return ENOMEM; splp = SCSI_LOW_MALLOC(sizeof(*splp)); if (splp == NULL) + { + SCSI_LOW_FREE(sap); return ENOMEM; + } SCSI_LOW_BZERO(sap, sizeof(*sap)); SCSI_LOW_BZERO(splp, sizeof(*splp));