Skip to content

Commit

Permalink
nl80211: 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 c43bb9d commit c1342d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nl80211.c
Expand Up @@ -2514,7 +2514,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 @@ -2524,7 +2524,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 c1342d9

Please sign in to comment.