From owner-freebsd-current@FreeBSD.ORG Sat Apr 29 23:47:51 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4055016A400; Sat, 29 Apr 2006 23:47:51 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABF8B43D45; Sat, 29 Apr 2006 23:47:48 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k3TNlkjY019149; Sat, 29 Apr 2006 17:47:47 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4453FB29.3040309@samsco.org> Date: Sat, 29 Apr 2006 17:47:53 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051230 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joe Marcus Clarke References: <1146346120.16564.12.camel@shumai.marcuscom.com> In-Reply-To: <1146346120.16564.12.camel@shumai.marcuscom.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-current@freebsd.org Subject: Re: File descriptor leak in libcam X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Apr 2006 23:47:51 -0000 Joe Marcus Clarke wrote: > There is a leak in the cam_lookup_pass() if the ioctl call fails to find > the passthru device. Basically, the xpt file descriptor will not be > closed. Can anyone give me permission to commit the following patch? > Thanks. > > http://www.marcuscom.com/downloads/camlib.c.diff > > Joe > Looks good to me. Style-wise, I'd have it close the fd before testing the return of the ioctl, but that's minor. Scott