lkml.org 
[lkml]   [2003]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: Misc 2.5 Fixes: mem-leak-rio


    Fix memory leak - free on copyin failure.


    drivers/char/rio/rioboot.c | 1 +
    1 files changed, 1 insertion(+)

    diff -puN drivers/char/rio/rioboot.c~mem-leak-rio drivers/char/rio/rioboot.c
    --- linux-2.5.70-ds/drivers/char/rio/rioboot.c~mem-leak-rio 2003-06-08 21:21:50.000000000 +0530
    +++ linux-2.5.70-ds-dipankar/drivers/char/rio/rioboot.c 2003-06-08 21:21:50.000000000 +0530
    @@ -326,6 +326,7 @@ register struct DownLoad *rbp;

    if ( copyin((int)rbp->DataP,DownCode,rbp->Count)==COPYFAIL ) {
    rio_dprintk (RIO_DEBUG_BOOT, "Bad copyin of host data\n");
    + sysfree( DownCode, rbp->Count );
    p->RIOError.Error = COPYIN_FAILED;
    func_exit ();
    return -EFAULT;
    _
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:36    [W:0.018 / U:1.648 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site