]> git.baikalelectronics.ru Git - kernel.git/commit
net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event
authorXie He <xie.he.0141@gmail.com>
Thu, 31 Dec 2020 17:43:31 +0000 (09:43 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 4 Jan 2021 21:42:41 +0000 (13:42 -0800)
commit02ea8eb8e831d8bae2b19f2374a97ffa09503730
tree53ad9a4b54b8276eccedcc4bb643423d4cb760ac
parent6c191a2d5cfabd0d6a4f24ead3bbc0ed59d23f56
net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event

In lapb_device_event, lapb_devtostruct is called to get a reference to
an object of "struct lapb_cb". lapb_devtostruct increases the refcount
of the object and returns a pointer to it. However, we didn't decrease
the refcount after we finished using the pointer. This patch fixes this
problem.

Fixes: 68c1368bd604 ("net/lapb: support netdev events")
Cc: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Link: https://lore.kernel.org/r/20201231174331.64539-1-xie.he.0141@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/lapb/lapb_iface.c