diff options
author | Xie He <xie.he.0141@gmail.com> | 2020-12-31 09:43:31 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-04 13:42:41 -0800 |
commit | b40f97b91a3b167ab22c9e9f1ef00b1615ff01e9 (patch) | |
tree | 53ad9a4b54b8276eccedcc4bb643423d4cb760ac | |
parent | e80bd76fbf563cc7ed8c9e9f3bbcdf59b0897f69 (diff) | |
download | lwn-b40f97b91a3b167ab22c9e9f1ef00b1615ff01e9.tar.gz lwn-b40f97b91a3b167ab22c9e9f1ef00b1615ff01e9.zip |
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: a4989fa91110 ("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>
-rw-r--r-- | net/lapb/lapb_iface.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 213ea7abc9ab..40961889e9c0 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c @@ -489,6 +489,7 @@ static int lapb_device_event(struct notifier_block *this, unsigned long event, break; } + lapb_put(lapb); return NOTIFY_DONE; } |