Commit 382fee1a authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Jens Axboe

nvmet: fix a memory leak

We forgot to free new_model_number

Fixes: 013b7ebe ("nvmet: make ctrl model configurable")
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 27029b4b
......@@ -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;
}
......
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