Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 1999 15:03:01 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        crb@ChrisBowman.com (Christopher R. Bowman)
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: Question about ncr.c
Message-ID:  <199905212103.PAA72441@panzer.plutotech.com>
In-Reply-To: <199905211933.PAA07285@quark.ChrisBowman.com> from "Christopher R. Bowman" at "May 21, 1999 03:31:31 pm"

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

Ken
-- 
Kenneth Merry
ken@plutotech.com


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?199905212103.PAA72441>