cxgb4: fix a memory leak bug
authorWenwen Wang <wenwen@cs.uga.edu>
Tue, 13 Aug 2019 09:18:52 +0000 (04:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:31:00 +0000 (10:31 +0100)
commit0b9e6253db9f607a167a53fe0006820c68b32aff
treef8491d83ec7c3963e2ba865752b8736cce505912
parentf45f30e84559050d1d132b636bbcfe0be5ca0f65
cxgb4: fix a memory leak bug

[ Upstream commit c554336efa9bbc28d6ec14efbee3c7d63c61a34f ]

In blocked_fl_write(), 't' is not deallocated if bitmap_parse_user() fails,
leading to a memory leak bug. To fix this issue, free t before returning
the error.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c