lkml.org 
[lkml]   [2016]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Staging: Media: Lirc - Fix possible ERR_PTR() dereferencing.
On Tue, Sep 20, 2016 at 12:21:21PM +0530, Shailendra Verma wrote:
> This is of course wrong to call kfree() if memdup_user() fails,
> no memory was allocated and the error in the error-valued pointer
> should be returned.
>
> Reviewed-by: Ravikant Sharma <ravikant.s2@samsung.com>
> Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>

Calling kfree(NULL) is fine so there is no bug in the original code.
Also this patch creates a new locking bug.

regards,
dan carpenter

\
 
 \ /
  Last update: 2016-09-20 10:45    [W:0.317 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site