]> git.baikalelectronics.ru Git - kernel.git/commit
staging/rdma/hfi1: Fix a possible null pointer dereference
authorEaswar Hariharan <easwar.hariharan@intel.com>
Thu, 10 Dec 2015 16:13:38 +0000 (11:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 22:00:17 +0000 (14:00 -0800)
commitf6db3ce0cbf597e587def47a5f49424c7ab7fa79
tree197b962b1dcdab64c9e7afcb00348010e51e967b
parentb7db1f8bb254867f80eee30a63909ff94983183b
staging/rdma/hfi1: Fix a possible null pointer dereference

A code inspection pointed out that kmalloc_array may return NULL and
memset doesn't check the input pointer for NULL, resulting in a possible
NULL dereference. This patch fixes this.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/chip.c