]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure
authorJoern Engel <joern@logfs.org>
Tue, 2 Sep 2014 21:49:54 +0000 (17:49 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 17 Sep 2014 20:44:01 +0000 (13:44 -0700)
commit06d1d517faf0b1c9e4947b98d2b2f794ec6002db
tree5f161b9fc869430e10864c66f3491dce6b7ecf15
parent9bff52c69428147ddd8e5e36e108e17e0e4086ea
iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure

In iscsi_copy_param_list() a failed iscsi_param_list memory allocation
currently invokes iscsi_release_param_list() to cleanup, and will promptly
trigger a NULL pointer dereference.

Instead, go ahead and return for the first iscsi_copy_param_list()
failure case.

Found by coverity.

Signed-off-by: Joern Engel <joern@logfs.org>
Cc: <stable@vger.kernel.org> # v3.1+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_parameters.c