OSDN Git Service

nvme: fix memory leak freeing command effects
authorKeith Busch <kbusch@kernel.org>
Fri, 13 Nov 2020 18:45:45 +0000 (10:45 -0800)
committerChristoph Hellwig <hch@lst.de>
Sat, 14 Nov 2020 08:57:55 +0000 (09:57 +0100)
commit8168d23fbcee4f9f6c5a1ce8650417f09aef70eb
tree9921efe963e679f99953ba22b6f63e3c9bd60522
parentf6224b8681326856937420e1db18564a934bf32b
nvme: fix memory leak freeing command effects

xa_destroy() frees only internal data. The caller is responsible for
freeing the exteranl objects referenced by an xarray.

Fixes: 1cf7a12e09aa4 ("nvme: use an xarray to lookup the Commands Supported and Effects log")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c