From owner-svn-src-stable@FreeBSD.ORG Sat Oct 31 11:23:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77B6F1065670; Sat, 31 Oct 2009 11:23:54 +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 666478FC0C; Sat, 31 Oct 2009 11:23:54 +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 n9VBNsoD087646; Sat, 31 Oct 2009 11:23:54 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9VBNsRk087644; Sat, 31 Oct 2009 11:23:54 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200910311123.n9VBNsRk087644@svn.freebsd.org> From: Christian Brueffer Date: Sat, 31 Oct 2009 11:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198713 - in stable/7/sys: . cam/scsi contrib/pf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 11:23:54 -0000 Author: brueffer Date: Sat Oct 31 11:23:54 2009 New Revision: 198713 URL: http://svn.freebsd.org/changeset/base/198713 Log: MFC: 198356 Fix a memory leak in an error case. Modified: stable/7/sys/ (props changed) stable/7/sys/cam/scsi/scsi_low.c stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cam/scsi/scsi_low.c ============================================================================== --- stable/7/sys/cam/scsi/scsi_low.c Sat Oct 31 11:21:45 2009 (r198712) +++ stable/7/sys/cam/scsi/scsi_low.c Sat Oct 31 11:23:54 2009 (r198713) @@ -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));