iscsi-target: missing kfree() on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 24 Jun 2013 15:46:57 +0000 (18:46 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 4 Jul 2013 02:44:34 +0000 (19:44 -0700)
Fix-up breakage in iscsit_build_sendtargets_response() from v3.11
changes, and free "payload" before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c

index dc2c0565736df1df58f3019eea4fa22f7805d9e5..19a31f9bb7d5f26372239f8163967ed0c82d2bd8 100644 (file)
@@ -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;
                }
                /*