Skip to content

Commit

Permalink
route: fix just introduced use-after-free in rtnl_act_parse()
Browse files Browse the repository at this point in the history
Fixes: 105a6be ('route: use cleanup macro in rtnl_act_parse()')
  • Loading branch information
thom311 committed Dec 1, 2023
1 parent 105a6be commit efd65fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/route/act.c
Expand Up @@ -496,6 +496,8 @@ int rtnl_act_parse(struct rtnl_act **head, struct nlattr *tb)
err = rtnl_act_append(&tmp_head, act);
if (err < 0)
return err;

_nl_steal_pointer(&act);
}

*head = _nl_steal_pointer(&tmp_head);
Expand Down

0 comments on commit efd65fe

Please sign in to comment.