Skip to content

Commit

Permalink
rtnl: add missing ucv_get() calls
Browse files Browse the repository at this point in the history
Arguments stored in the registry need an extra reference

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Feb 13, 2023
1 parent c1342d9 commit 9022b27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rtnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3704,7 +3704,7 @@ uc_nl_listener(uc_vm_t *vm, size_t nargs)
break;
}

ucv_array_set(listener_registry, i + 1, cb_func);
ucv_array_set(listener_registry, i + 1, ucv_get(cb_func));
l = xalloc(sizeof(*l));
l->index = i;
if (!uc_nl_fill_cmds(l->cmds, cmds)) {
Expand All @@ -3714,7 +3714,7 @@ uc_nl_listener(uc_vm_t *vm, size_t nargs)
}

rv = uc_resource_new(listener_type, l);
ucv_array_set(listener_registry, i, rv);
ucv_array_set(listener_registry, i, ucv_get(rv));
listener_vm = vm;

return rv;
Expand Down

0 comments on commit 9022b27

Please sign in to comment.