projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76c08bf
)
nvme-fabrics: Fix memory leaks in nvmf_parse_options()
author
Bart Van Assche
<bart.vanassche@sandisk.com>
Tue, 18 Oct 2016 20:10:46 +0000
(13:10 -0700)
committer
Sagi Grimberg
<sagi@grimberg.me>
Tue, 6 Dec 2016 08:17:03 +0000
(10:17 +0200)
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>
drivers/nvme/host/fabrics.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/nvme/host/fabrics.c
b/drivers/nvme/host/fabrics.c
index 68fb26b3bfb9e7020f9f5a4f4ce73928815346b4..12f19c4665cf459ae55481f7cf3e9db932eaabdf 100644
(file)
--- a/
drivers/nvme/host/fabrics.c
+++ b/
drivers/nvme/host/fabrics.c
@@
-666,10
+666,12
@@
static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
if (nqnlen >= NVMF_NQN_SIZE) {
pr_err("%s needs to be < %d bytes\n",
p, NVMF_NQN_SIZE);
+ kfree(p);
ret = -EINVAL;
goto out;
}
opts->host = nvmf_host_add(p);
+ kfree(p);
if (!opts->host) {
ret = -ENOMEM;
goto out;