Skip to content

Commit b40f97b

Browse files
Xie Hekuba-moo
authored andcommitted
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: a4989fa ("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>
1 parent e80bd76 commit b40f97b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/lapb/lapb_iface.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ static int lapb_device_event(struct notifier_block *this, unsigned long event,
489489
break;
490490
}
491491

492+
lapb_put(lapb);
492493
return NOTIFY_DONE;
493494
}
494495

0 commit comments

Comments
 (0)