diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 0a5a4c4684bca1e92852c2f7552ec7c5ed8383c9..dc996761042ffb61e3fc38d4d92b2d43fcfea530 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -88,6 +88,10 @@ static void nvmf_host_destroy(struct kref *ref) { struct nvmf_host *host = container_of(ref, struct nvmf_host, ref); + mutex_lock(&nvmf_hosts_mutex); + list_del(&host->list); + mutex_unlock(&nvmf_hosts_mutex); + kfree(host); }