linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-fabrics: remove superfluous nvmf_host_put in nvmf_parse_options
@ 2021-07-09  2:32 Hou Pu
  2021-07-16  7:25 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Hou Pu @ 2021-07-09  2:32 UTC (permalink / raw)
  To: sagi, hch, chaitanya.kulkarni; +Cc: linux-nvme, houpu.main

Opts->host is NULL there. It is checked just before. So remove
nvmf_host_put. It is introduced by commit 59a2f3f00fd7 ("nvme: fix
potential memory leak in option parsing").

Signed-off-by: Hou Pu <houpu.main@gmail.com>
---
 drivers/nvme/host/fabrics.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index a5469fd9d4c3..668c6bb7a567 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -719,7 +719,6 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
 				ret = -EINVAL;
 				goto out;
 			}
-			nvmf_host_put(opts->host);
 			opts->host = nvmf_host_add(p);
 			kfree(p);
 			if (!opts->host) {
-- 
2.28.0


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvme-fabrics: remove superfluous nvmf_host_put in nvmf_parse_options
  2021-07-09  2:32 [PATCH] nvme-fabrics: remove superfluous nvmf_host_put in nvmf_parse_options Hou Pu
@ 2021-07-16  7:25 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2021-07-16  7:25 UTC (permalink / raw)
  To: Hou Pu; +Cc: sagi, hch, chaitanya.kulkarni, linux-nvme

Thanks,

applied to nvme-5.15.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-16  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-09  2:32 [PATCH] nvme-fabrics: remove superfluous nvmf_host_put in nvmf_parse_options Hou Pu
2021-07-16  7:25 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).