lkml.org 
[lkml]   [2010]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] staging: ft1000: fix error path
    On Sun, Sep 26, 2010 at 12:59:55PM +0400, Vasiliy Kulikov wrote:
    > +err_free:
    > + for (i--; i>=0; i--) {
    > + kfree(pdpram_blk->pbuffer);
    > + kfree(pdpram_blk);
    > + }

    This is wrong. I don't have linux-next so I can't see the context, why
    are we looping here? The second iteration through the loop will cause a
    NULL dereference.

    Also there should be spaces before and after the ">=".

    regards,
    dan carpenter

    > + return STATUS_FAILURE;
    > }
    >



    \
     
     \ /
      Last update: 2010-09-27 20:11    [W:0.028 / U:0.316 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site