spi: spi-mem: Fix a memory leak in spi_mem_dirmap_destroy()
authorBoris Brezillon <bbrezillon@kernel.org>
Sat, 19 Jan 2019 14:57:57 +0000 (15:57 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 21 Jan 2019 17:57:14 +0000 (17:57 +0000)
commitbfecfd6e23bf677c85828eb20fa4b13a18bffe23
tree818c65255f644de45463589a02ef38d3d056cac1
parent5c0c4ec9ba61a98ecb79036afc013bba8d5b85e3
spi: spi-mem: Fix a memory leak in spi_mem_dirmap_destroy()

The dirmap descriptor object allocated in spi_mem_dirmap_create is
never freed. Add a kfree(desc) in spi_mem_dirmap_destroy().

Fixes: aa167f3fed0c ("spi: spi-mem: Add a new API to support direct mapping")
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mem.c