]> git.baikalelectronics.ru Git - kernel.git/commit
orinoco: Move context allocation after processing the skb
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 13 Nov 2020 21:22:43 +0000 (22:22 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 24 Nov 2020 15:01:06 +0000 (17:01 +0200)
commitf46af85bc920b9d413894a724feda13be9769d01
treec307ad4d4d333f001b6aa35e5284aedb56b74e91
parent25d60615a812d4572b33a59f7f00922fa2b9c5f1
orinoco: Move context allocation after processing the skb

ezusb_xmit() allocates a context which is leaked if
orinoco_process_xmit_skb() returns an error.

Move ezusb_alloc_ctx() after the invocation of
orinoco_process_xmit_skb() because the context is not needed so early.
ezusb_access_ltv() will cleanup the context in case of an error.

Fixes: 674011a109c6a ("orinoco: refactor xmit path")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201113212252.2243570-2-bigeasy@linutronix.de
drivers/net/wireless/intersil/orinoco/orinoco_usb.c