From owner-p4-projects@FreeBSD.ORG Tue Dec 12 12:41:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9BB0516A412; Tue, 12 Dec 2006 12:41:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63FAF16A416; Tue, 12 Dec 2006 12:41:40 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C0C743CAB; Tue, 12 Dec 2006 12:40:16 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id kBCCfbVF043141; Tue, 12 Dec 2006 13:41:37 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id kBCCfTdl042118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Dec 2006 13:41:30 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id kBCCfTjJ074589; Tue, 12 Dec 2006 13:41:29 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id kBCCfTuC074588; Tue, 12 Dec 2006 13:41:29 +0100 (CET) (envelope-from ticso) Date: Tue, 12 Dec 2006 13:41:29 +0100 From: Bernd Walter To: Warner Losh Message-ID: <20061212124128.GS54209@cicely12.cicely.de> References: <200612120328.kBC3SVQX086559@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200612120328.kBC3SVQX086559@repoman.freebsd.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: Perforce Change Reviews Subject: Re: PERFORCE change 111526 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 12:41:40 -0000 On Tue, Dec 12, 2006 at 03:28:31AM +0000, Warner Losh wrote: > http://perforce.freebsd.org/chv.cgi?CH=111526 > > Change 111526 by imp@imp_lighthouse on 2006/12/12 03:27:31 > > Don't leak a lock on an invalid transfer. Ups... > Affected files ... > > .. //depot/projects/arm/src/sys/arm/at91/at91_twi.c#39 edit > > Differences ... > > ==== //depot/projects/arm/src/sys/arm/at91/at91_twi.c#39 (text+ko) ==== > > @@ -321,8 +321,10 @@ > len = msgs[i].len; > buf = msgs[i].buf; > /* zero byte transfers aren't allowed */ > - if (len == 0 || buf == NULL) > - return (EINVAL); > + if (len == 0 || buf == NULL) { > + err = EINVAL; > + goto out; > + } > if (len == 1) > WR4(sc, TWI_CR, TWI_CR_START | TWI_CR_STOP); > else -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de