mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 22:52:04 +00:00
nhrpd: Fix clang SA about null deref
Clang was complaining when running SA that the nhrpd_privs.change function was null. It just does not fully understand how things are setup. Add a assert to make it happy. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
0fec6da172
commit
8ca7a3ed38
@ -144,8 +144,13 @@ int main(int argc, char **argv)
|
|||||||
nhrp_interface_init();
|
nhrp_interface_init();
|
||||||
resolver_init(master);
|
resolver_init(master);
|
||||||
|
|
||||||
/* Run with elevated capabilities, as for all netlink activity
|
/*
|
||||||
* we need privileges anyway. */
|
* Run with elevated capabilities, as for all netlink activity
|
||||||
|
* we need privileges anyway.
|
||||||
|
* The assert is for clang SA code where it does
|
||||||
|
* not see the change function being set in lib
|
||||||
|
*/
|
||||||
|
assert(nhrpd_privs.change);
|
||||||
nhrpd_privs.change(ZPRIVS_RAISE);
|
nhrpd_privs.change(ZPRIVS_RAISE);
|
||||||
|
|
||||||
netlink_init();
|
netlink_init();
|
||||||
|
Loading…
Reference in New Issue
Block a user