Anton Moryakov 0b09a1b053 misc: fix memory leak in ifstat.c
A memory leak was detected by the static analyzer SVACE in the function
get_nlmsg_extended(). The issue occurred when parsing extended interface
statistics failed due to a missing nested attribute. In this case,
memory allocated for 'n->name' via strdup() was not freed before returning,
resulting in a leak.

The fix adds an explicit 'free(n->name)' call before freeing the containing
structure in the error path.

Reported-by: SVACE static analyzer
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2025-07-29 23:12:34 +00:00
..
2020-01-20 09:43:22 -08:00
2025-07-29 23:12:34 +00:00
2023-01-14 09:00:34 -08:00
2020-08-03 10:02:47 -07:00
2020-05-13 14:28:38 +00:00
2024-05-23 09:27:55 -07:00
2023-01-14 09:00:34 -08:00
2023-01-14 09:00:34 -08:00
2023-01-14 09:00:34 -08:00