diff options
Diffstat (limited to 'src/set.c')
-rw-r--r-- | src/set.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -227,9 +227,11 @@ ly_set_rm(struct ly_set *set, void *object, void (*destructor)(void *obj)) return ly_set_rm_index(set, i, destructor); } -LY_ERR +LIBYANG_API_DEF LY_ERR ly_set_rm_index_ordered(struct ly_set *set, uint32_t index, void (*destructor)(void *obj)) { + LY_CHECK_ARG_RET(NULL, set, set->count, LY_EINVAL); + if (destructor) { destructor(set->objs[index]); } |