Commit ca8d090
committed
critnib: add a reference counter and critnib_release()
Add a reference counter and critnib_release() function.
When cb_free_leaf() is SET in critnib_new() the following 4 functions:
- critnib_remove(),
- critnib_get(),
- critnib_find_le() and
- critnib_find()
return a reference (void *ref) to the returned value,
that MUST be released by calling critnib_release()
when it is no longer used and can be freed
using the cb_free_leaf() callback.
Fixes: #1233
Signed-off-by: Lukasz Dorau <[email protected]>1 parent 682f88a commit ca8d090
File tree
6 files changed
+570
-124
lines changed- src
- critnib
- pool
- provider
6 files changed
+570
-124
lines changed
0 commit comments