[Bug 199671] [patch] memory leak in cam scsi

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Apr 26 19:22:22 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199671

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

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

--- Comment #5 from Pedro F. Giffuni <pfg at 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.


More information about the freebsd-scsi mailing list