diff options
author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2021-10-27 03:07:40 +0900 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-11-06 17:29:40 +0100 |
commit | d9447f768bc8c60623e4bb3ce65b8f4654d33a50 (patch) | |
tree | 662f2f70c648318cf84a929b7d38dbcdd61d28b2 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 164051a6ab5445bd97f719f50b16db8b32174269 (diff) |
can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path
In es58x_rx_err_msg(), if can->do_set_mode() fails, the function
directly returns without calling netif_rx(skb). This means that the
skb previously allocated by alloc_can_err_skb() is not freed. In other
terms, this is a memory leak.
This patch simply removes the return statement in the error branch and
let the function continue.
Issue was found with GCC -fanalyzer, please follow the link below for
details.
Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
Link: https://lore.kernel.org/all/20211026180740.1953265-1-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions