From owner-cvs-src@FreeBSD.ORG Fri Nov 16 22:35:39 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42EC416A469; Fri, 16 Nov 2007 22:35:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 198F513C46A; Fri, 16 Nov 2007 22:35:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lAGMZXXF078212; Fri, 16 Nov 2007 22:35:33 GMT (envelope-from bz@repoman.freebsd.org) Received: (from bz@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lAGMZX09078211; Fri, 16 Nov 2007 22:35:33 GMT (envelope-from bz) Message-Id: <200711162235.lAGMZX09078211@repoman.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 16 Nov 2007 22:35:33 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/netipsec keysock.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2007 22:35:39 -0000 bz 2007-11-16 22:35:33 UTC FreeBSD src repository Modified files: sys/netipsec keysock.c Log: Move the priv check before the malloc call for so_pcb. In case attach fails because of the priv check we leaked the memory and left so_pcb as fodder for invariants. Reported by: Pawel Worach Reviewed by: rwatson Revision Changes Path 1.20 +6 -6 src/sys/netipsec/keysock.c