]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-fc: avoid memory corruption caused by calling nvmf_free_options() twice
authorEwan D. Milne <emilne@redhat.com>
Mon, 24 Apr 2017 17:24:16 +0000 (13:24 -0400)
committerChristoph Hellwig <hch@lst.de>
Tue, 25 Apr 2017 18:00:59 +0000 (20:00 +0200)
commita84d81f264de335a9cd891b1964837558fb2c50d
treebef80837e850eee8e11f7a695e2e8cb212d171b6
parentd8b308e554557bc739c02a885fa2769d180fae98
nvme-fc: avoid memory corruption caused by calling nvmf_free_options() twice

Do not call nvmf_free_options() from the nvme_fc_ctlr destructor if
nvme_fc_create_ctrl() returns an error, because nvmf_create_ctrl()
frees the options when an error is returned.

Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c