Commit f3116d8f authored by Bart Van Assche's avatar Bart Van Assche Committed by Sagi Grimberg

nvme-fabrics: Fix a memory leak in an nvmf_create_ctrl() error path

Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
parent 8eadfcb1
...@@ -827,8 +827,7 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count) ...@@ -827,8 +827,7 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count)
out_unlock: out_unlock:
mutex_unlock(&nvmf_transports_mutex); mutex_unlock(&nvmf_transports_mutex);
out_free_opts: out_free_opts:
nvmf_host_put(opts->host); nvmf_free_options(opts);
kfree(opts);
return ERR_PTR(ret); return ERR_PTR(ret);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment