Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 2006 17:47:53 -0600
From:      Scott Long <scottl@samsco.org>
To:        Joe Marcus Clarke <marcus@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: File descriptor leak in libcam
Message-ID:  <4453FB29.3040309@samsco.org>
In-Reply-To: <1146346120.16564.12.camel@shumai.marcuscom.com>
References:  <1146346120.16564.12.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4453FB29.3040309>