Date: Fri, 21 May 1999 16:46:24 -0500 From: Chris Costello <chris@calldei.com> To: "Christopher R. Bowman" <crb@ChrisBowman.com> Cc: "Kenneth D. Merry" <ken@plutotech.com>, freebsd-scsi@FreeBSD.ORG Subject: Re: Question about ncr.c Message-ID: <19990521164624.B10777@holly.dyndns.org> In-Reply-To: <199905212141.RAA07519@quark.ChrisBowman.com>; from Christopher R. Bowman on Fri, May 21, 1999 at 05:40:12PM -0400 References: <199905211933.PAA07285@quark.ChrisBowman.com> <199905212103.PAA72441@panzer.plutotech.com> <199905212141.RAA07519@quark.ChrisBowman.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 21, 1999, Christopher R. Bowman wrote: > At 03:03 PM 5/21/99 -0600, Kenneth D. Merry wrote: > >Christopher R. Bowman wrote... > >> a small section of ncr.c is presented below. Shouldn't line 3851 read > >> > >> cam_sim_free(np->sim, /*free_simq*/TRUE); > >> instead of just free? Not much practical difference, but it just seems more > correct. > > > >[ ... ] > > > >> 3850 if (xpt_bus_register(np->sim, 0) != CAM_SUCCESS) { > >> 3851 free(np->sim, M_DEVBUF); > >> 3852 return; > >> 3853 } > > > >Yeah, looks like a bug. Your solution is correct. The current code will > >cause a memory leak since np->sim->devq won't get freed. > > it's not like it's a serious bug, it only happens if memory is short at ncr Serious or not, it's a bug, and bugs in drivers, especially fixable ones, are a no-no. -- Chris Costello <chris@calldei.com> Meets quality standards: It compiles without errors. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990521164624.B10777>