Skip to content

Commit

Permalink
interfaces-plugin: add return value check for if_state_list_get_by_if…
Browse files Browse the repository at this point in the history
…_name inside cache_change_cb
  • Loading branch information
feelqah committed Sep 12, 2022
1 parent 60d2a6a commit a1738f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/interfaces/interfaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -3037,7 +3037,13 @@ static void cache_change_cb(struct nl_cache *cache, struct nl_object *obj, int v

while (link != NULL) {
name = rtnl_link_get_name(link);

tmp_st = if_state_list_get_by_if_name(&if_state_changes, name);
if (!tmp_st) {
link = (struct rtnl_link *) nl_cache_get_next((struct nl_object *) link);
continue;
}

tmp_state = rtnl_link_get_operstate(link);

if (tmp_state != tmp_st->state) {
Expand Down

0 comments on commit a1738f4

Please sign in to comment.