lkml.org 
[lkml]   [2014]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] lustre/mdc_lib: fix possible null pointer dereference
From
Hi,

On Thu, Mar 6, 2014 at 8:51 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Wed, Mar 05, 2014 at 09:53:06PM +0300, Dan Carpenter wrote:
>> On Wed, Mar 05, 2014 at 02:04:35PM +0100, Maxin B. John wrote:
>> > From: "Maxin B. John" <maxin.john@enea.com>
>> >
>> > cppcheck reported possible null pointer dereference in mdc_lib.c
>> >
>> > [lustre/lustre/mdc/mdc_lib.c:233]: (error) Possible null pointer dereference
>> > : op_data - otherwise it is redundant to check if op_data is null at line 226
>> >
>>
>> There is only one caller and "op_data" is not NULL.
>
> I agree, John, please fix your tools. Or check the result and fix the
> code so that there isn't false-positives (by not checking for NULL at
> all here...)

Thanks to Dan and Greg for the comments. Will try my best to avoid
these kind of mistakes in future.

> thanks,
> greg k-h

Best Regards,
Maxin


\
 
 \ /
  Last update: 2014-03-06 23:21    [W:0.052 / U:26.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site