lkml.org 
[lkml]   [2017]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values
From
Date
On 2017-07-07 06:53, Gustavo A. R. Silva wrote:
> Check return values from call to devm_kzalloc() and devm_kmemup()

If someone cares enough: s/devm_kmemup/evm_kmemdup/


> in order to prevent a NULL pointer dereference.
>
> This issue was detected using Coccinelle and the following semantic patch:
>
> @@
> expression x;
> identifier fld;
> @@
>
> * x = devm_kzalloc(...);
> ... when != x == NULL
> x->fld
>
> Cc: Peter Rosin <peda@axentia.se>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Either way,

Reviewed-by: Peter Rosin <peda@axentia.se>

Thanks!

\
 
 \ /
  Last update: 2017-07-07 06:58    [W:0.135 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site