net: e1000: Free temporary buffer on exit
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 4 Aug 2025 15:32:51 +0000 (16:32 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 14 Aug 2025 16:58:40 +0000 (10:58 -0600)
commit4266b8a2839f4e3eee2d7ce5f61af0c0ed0fe3b9
tree7c88d226a78bcde109d6565ccb04e00900832665
parent28a87c8e9bc889a875b7b4b84d99ceb905d9d2d8
net: e1000: Free temporary buffer on exit

In do_e1000_spi_checksum a temporary buffer is allocated but never
freed. Add code to free on exit. Also refactor the code to make the exit
code common.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/net/e1000_spi.c