netlink: add NULL check for get_string() in features.c

Report of the static analyzer:
Return value of a function 'get_string' is dereferenced at features.c:279
without checking for NULL, but it is usually checked for this function (6/7).

Correct explained:
Added NULL check for get_string() return value before passing to strcmp()
to prevent potential NULL pointer dereference. This matches the behavior
in other similar code paths where get_string() is used.

Triggers found by static analyzer Svace.

Fixes: a7a05af4a1ea ("netlink: add netlink handler for sfeatures (-K)")
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
1 file changed