]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc
authorAditya Pakki <pakki001@umn.edu>
Wed, 20 Mar 2019 15:42:32 +0000 (10:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Mar 2019 07:32:58 +0000 (08:32 +0100)
commitf78e698489fbcace226c356ebab8692877a565d7
treed85264722e8e6ae272a952392447763c76a40488
parenta51cc1016555246c9ee8095a3da403c0025345fb
staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc

phydm.internal is allocated using kzalloc which is used multiple
times without a check for NULL pointer. This patch avoids such a
scenario by returning 0, consistent with the failure case.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/phydm/rtl_phydm.c