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)
commitde41447aac034c4acc8d9d1ddbdcb7ce4e8a3f6f
treebef80837e850eee8e11f7a695e2e8cb212d171b6
parentbbe3012b73b592dfe5f4340a14373840f51887b6
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