Re: [PATCH] staging: vt6656: Don't leak memory indrivers/staging/vt6656/ioctl.c::private_ioctl()

From: Greg Kroah-Hartman
Date: Wed Apr 11 2012 - 18:49:21 EST


On Wed, Apr 11, 2012 at 06:46:33PM -0400, Xi Wang wrote:
> 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..

One thing at a time, odds are this is an "automated" patch, right
Jesper?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/