Re: [PATCH 08/17] target: avoid NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/28/2014 4:01 AM, Joern Engel wrote:
iscsi_release_param_list() cannot handle a NULL pointer.  Found by
coverity.

Signed-off-by: Joern Engel <joern@xxxxxxxxx>
---
  drivers/target/iscsi/iscsi_target_parameters.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index 02f9de26f38a..18c29260b4a2 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -601,7 +601,7 @@ int iscsi_copy_param_list(
  	param_list = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL);
  	if (!param_list) {
  		pr_err("Unable to allocate memory for struct iscsi_param_list.\n");
-		goto err_out;
+		return -1;
  	}
  	INIT_LIST_HEAD(&param_list->param_list);
  	INIT_LIST_HEAD(&param_list->extra_response_list);


Why won't you escalate correct error ENOMEM?
Although the caller don't care about it...

might be a good idea to follow up if return codes should propagate
better in this area...

Sagi.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux