There is a memory leak here.

Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>

diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index 57d39c5..29850cb 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -1420,6 +1420,7 @@ static struct se_wwn *tcm_vhost_make_tport(
 
        pr_err("Unable to locate prefix for emulated Target Port:"
                        " %s\n", name);
+       kfree(tport);
        return ERR_PTR(-EINVAL);
 
 check_len:
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to