Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Apr 2015 19:22:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-scsi@FreeBSD.org
Subject:   [Bug 199671] [patch] memory leak in cam scsi
Message-ID:  <bug-199671-5312-XWTpGX1xqB@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-199671-5312@https.bugs.freebsd.org/bugzilla/>
References:  <bug-199671-5312@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199671

Pedro F. Giffuni <pfg@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #156014|0                           |1
        is obsolete|                            |

--- Comment #5 from Pedro F. Giffuni <pfg@FreeBSD.org> ---
Comment on attachment 156014
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=156014
Fix avoiding double free

(In reply to Steven Hartland from comment #4)

I think assigning the NULLs is actually unnecessary: all the occasions where
scan_info is free'd go to a break. The first patch seems fine.

Moving the free() out of the loop would be a possibility but seems better to
release the memory as soon as it is used, and I suspect that's what the author
had in mind. OTOH, but this is just me, I prefer to avoid modifying existing
code since this is not something I can test.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199671-5312-XWTpGX1xqB>