From: Bart Van Assche Date: Tue, 18 Oct 2016 20:11:03 +0000 (-0700) Subject: nvme-fabrics: Fix a memory leak in an nvmf_create_ctrl() error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3116d8f1e110a5eeaac94f5d1c490e9e466a223;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nvme-fabrics: Fix a memory leak in an nvmf_create_ctrl() error path Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg --- diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 12f19c4665cf..1a68b46fff5a 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -827,8 +827,7 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count) out_unlock: mutex_unlock(&nvmf_transports_mutex); out_free_opts: - nvmf_host_put(opts->host); - kfree(opts); + nvmf_free_options(opts); return ERR_PTR(ret); }