diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-05-03 19:46:41 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-05-03 19:46:41 -0400 |
commit | bfbdb31d41b3d868449de272da746d1c2d0b764e (patch) | |
tree | 6c44a368bc585bb08c4f88e15f48bacdb37fe462 /drivers/target | |
parent | 64146db71e1aab919a3861d4ac958086da3a0973 (diff) |
iscsi-target: Fix NULL pointer dereference in iscsit_send_reject
Fix up a NULL pointer dereference regression in iscsit_send_reject()
introduced by from commit 2ec5a8c11.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index ffbc6a94be52..c230eacc6ced 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -3557,11 +3557,11 @@ static int iscsit_send_reject( | |||
3557 | struct iscsi_cmd *cmd, | 3557 | struct iscsi_cmd *cmd, |
3558 | struct iscsi_conn *conn) | 3558 | struct iscsi_conn *conn) |
3559 | { | 3559 | { |
3560 | u32 iov_count = 0, tx_size = 0; | 3560 | struct iscsi_reject *hdr = (struct iscsi_reject *)&cmd->pdu[0]; |
3561 | struct iscsi_reject *hdr; | ||
3562 | struct kvec *iov; | 3561 | struct kvec *iov; |
3562 | u32 iov_count = 0, tx_size; | ||
3563 | 3563 | ||
3564 | iscsit_build_reject(cmd, conn, (struct iscsi_reject *)&cmd->pdu[0]); | 3564 | iscsit_build_reject(cmd, conn, hdr); |
3565 | 3565 | ||
3566 | iov = &cmd->iov_misc[0]; | 3566 | iov = &cmd->iov_misc[0]; |
3567 | iov[iov_count].iov_base = cmd->pdu; | 3567 | iov[iov_count].iov_base = cmd->pdu; |