Commit 4f45d320 authored by Dan Carpenter's avatar Dan Carpenter Committed by Nicholas Bellinger

iscsi-target: missing kfree() on error path

Fix-up breakage in iscsit_build_sendtargets_response() from v3.11
changes, and free "payload" before returning.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 3e23d025
...@@ -3421,6 +3421,7 @@ static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd) ...@@ -3421,6 +3421,7 @@ static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd)
if (!text_ptr) { if (!text_ptr) {
pr_err("Unable to locate '=' string in text_in:" pr_err("Unable to locate '=' string in text_in:"
" %s\n", text_in); " %s\n", text_in);
kfree(payload);
return -EINVAL; return -EINVAL;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment