]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm, namespace: potential NULL deref on allocation error
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 12 Oct 2016 06:34:29 +0000 (09:34 +0300)
committerDan Williams <dan.j.williams@intel.com>
Wed, 19 Oct 2016 17:35:51 +0000 (10:35 -0700)
commit778b761d886dd14ecedf312ce146e499e51b2772
tree3d279ed95896399f5b220ac0c554d632432de89a
parent1df7eb1ca477b826c461b694d57789b4da41844a
libnvdimm, namespace: potential NULL deref on allocation error

If the kcalloc() fails then "devs" can be NULL and we dereference it
checking "devs[i]".

Fixes: dcc9fe656562 ('libnvdimm: blk labels and namespace instantiation')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/namespace_devs.c