Markus Elfring 859abe3f92 tipc: Reduce scope for the variable “fdefq” in tipc_link_tnl_prepare()
The address of a data structure member was determined before
a corresponding null pointer check in the implementation of
the function “tipc_link_tnl_prepare”.

Thus avoid the risk for undefined behaviour by moving the definition
for the local variable “fdefq” into an if branch at the end.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patch.msgid.link/08fe8fc3-19c3-4324-8719-0ee74b0f32c9@web.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-03-04 17:19:49 -08:00
..
2024-07-12 03:41:32 +01:00
2024-08-26 09:48:53 -07:00