We need to free "payload" before returning.
Signed-off-by: Dan Carpenter <[email protected]>
diff --git a/drivers/target/iscsi/iscsi_target.c
b/drivers/target/iscsi/iscsi_target.c
index c1106bb..1e59630 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3426,6 +3426,7 @@ static int iscsit_build_sendtargets_response(struct
iscsi_cmd *cmd)
if (!text_ptr) {
pr_err("Unable to locate '=' string in text_in:"
" %s\n", text_in);
+ kfree(payload);
return -EINVAL;
}
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html