lkml.org 
[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] staging: vt6656: Don't leak memory in drivers/staging/vt6656/ioctl.c::private_ioctl()
    From
    Date
    On Apr 11, 2012, at 6:35 PM, Jesper Juhl wrote:

    > - pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
    > + pNodeList = kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);

    Can you also remove casts like "(int)GFP_ATOMIC"?

    The parentheses "(sNodeList.uItem * sizeof(SNodeItem))" are also
    pointless..

    - xi

    \
     
     \ /
      Last update: 2012-04-12 00:49    [W:0.024 / U:0.128 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site