diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2020-07-30 20:51:00 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-08-22 01:14:27 +0200 |
commit | 382fee1a8b623e2546a3e15e80517389e0e0673e (patch) | |
tree | 1d9270443d987089b315ba7a867bb9b3668e6628 /drivers/nvme/target/configfs.c | |
parent | blkcg: fix memleak for iolatency (diff) | |
download | linux-382fee1a8b623e2546a3e15e80517389e0e0673e.tar.xz linux-382fee1a8b623e2546a3e15e80517389e0e0673e.zip |
nvmet: fix a memory leak
We forgot to free new_model_number
Fixes: 013b7ebe5a0d ("nvmet: make ctrl model configurable")
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/configfs.c')
-rw-r--r-- | drivers/nvme/target/configfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c index 74b2b61c773b..37e1d7784e17 100644 --- a/drivers/nvme/target/configfs.c +++ b/drivers/nvme/target/configfs.c @@ -1136,6 +1136,7 @@ static ssize_t nvmet_subsys_attr_model_store(struct config_item *item, up_write(&nvmet_config_sem); kfree_rcu(new_model, rcuhead); + kfree(new_model_number); return count; } |