• Rik van Riel's avatar
    [PATCH] Re: [CHECKER] 112 potential memory leaks in 2.5.48 · b0bb3273
    Rik van Riel authored
    On Wed, 5 Feb 2003, Rik van Riel wrote:
    > On Tue, 4 Feb 2003, Andy Chou wrote:
    
    Thanks for the checker output.  First patch below...
    
    > > [BUG]
    > > u1/acc/linux/2.5.48/drivers/scsi/sr_ioctl.c:188:sr_do_ioctl:
    > > ERROR:LEAK:85:188:Memory leak [Allocated from:
    > > /u1/acc/linux/2.5.48/drivers/scsi/sr_ioctl.c:85:scsi_allocate_request]
    >
    > Bug indeed, I've created a patch to fix the possible leak of
    > a scsi request, but can't figure out the bounce buffer logic...
    
    The patch below fixes the scsi request leak. I'm not sure
    how the bounce buffer thing is supposed to work (Christoph?
    James?) so I'm not touching that at the moment.
    
    Linus, could you please apply this patch (against today's
    bk tree) ?
    
    thank you,
    
    Rik
    --
    Bravely reimplemented by the knights who say "NIH".
    http://www.surriel.com/		http://guru.conectiva.com/
    Current spamtrap:  <a href=mailto:"october@surriel.com">october@surriel.com</a>
    
    
    ===== drivers/scsi/sr_ioctl.c 1.27 vs edited =====
    b0bb3273
sr_ioctl.c 14.3 KB