nvmet: fix a memory leak

We forgot to free new_model_number

Fixes: 013b7ebe5a ("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>
This commit is contained in:
Sagi Grimberg 2020-07-30 11:51:00 -07:00 committed by Jens Axboe
parent 27029b4b18
commit 382fee1a8b

View File

@ -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;
}