From: Dan Carpenter Date: Mon, 24 Jun 2013 15:46:57 +0000 (+0300) Subject: iscsi-target: missing kfree() on error path X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4f45d320ba97ad2f1107a56e8b2af0dd7e764502;p=openwrt%2Fstaging%2Fblogic.git 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: Dan Carpenter Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index dc2c0565736d..19a31f9bb7d5 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3421,6 +3421,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; } /*