From 1af993335913b4c786da719015b5ba17cc8d5b2b Mon Sep 17 00:00:00 2001 From: "Alexander V. Chernikov" Date: Fri, 17 Feb 2023 17:58:53 +0000 Subject: [PATCH] netlink: call genetlink notification handler upon successful family search. Approved by: re (cperciva) (cherry picked from commit 7cbe771f013f6cf3316910648f6d46641cad7f44) (cherry picked from commit ac40ea6fbb4e6af98a4540fc8fd5a3e824cb181d) --- sys/netlink/netlink_generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 028ea24fc5e9..066379e2afae 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -160,9 +160,8 @@ genl_unregister_family(const char *family_name) GENL_LOCK(); struct genl_family *gf = find_family(family_name); - nlctrl_notify(gf, CTRL_CMD_DELFAMILY); - if (gf != NULL) { + nlctrl_notify(gf, CTRL_CMD_DELFAMILY); found = true; unregister_groups(gf); /* TODO: zero pointer first */