summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-10-18 13:11:03 -0700
committerSagi Grimberg <sagi@grimberg.me>2016-12-06 10:17:03 +0200
commitf3116d8f1e110a5eeaac94f5d1c490e9e466a223 (patch)
treef86bae6bf759cc5b1a2621d38a509bbdaf0a3b20 /drivers/nvme
parent8eadfcb1b63d7d9cd21dc7a2fd1d92efc5730ddd (diff)
downloadblackbird-op-linux-f3116d8f1e110a5eeaac94f5d1c490e9e466a223.tar.gz
blackbird-op-linux-f3116d8f1e110a5eeaac94f5d1c490e9e466a223.zip
nvme-fabrics: Fix a memory leak in an nvmf_create_ctrl() error path
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/fabrics.c3
1 files changed, 1 insertions, 2 deletions
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);
}
OpenPOWER on IntegriCloud