diff --git a/librz/include/rz_util/ht_inc.h b/librz/include/rz_util/ht_inc.h index 19858a015cb..e5172112c80 100644 --- a/librz/include/rz_util/ht_inc.h +++ b/librz/include/rz_util/ht_inc.h @@ -216,6 +216,7 @@ RZ_API HtRetCode Ht_(insert_kv_ex)(RZ_NONNULL HtName_(Ht) *ht, RZ_NONNULL HT_(Kv RZ_API RZ_OWN HT_(IterMutState) *Ht_(new_iter_mut_state)(RZ_NONNULL HtName_(Ht) *ht); RZ_API RZ_OWN HT_(IterState) *Ht_(new_iter_state)(const RZ_NONNULL HtName_(Ht) *ht); +RZ_API void Ht_(free_iter_mut_state)(RZ_NULLABLE HT_(IterMutState) *state); RZ_API void Ht_(free_iter_state)(RZ_NULLABLE HT_(IterState) *state); RZ_API RZ_BORROW VALUE_TYPE *Ht_(iter_next_mut)(RzIterator *it); diff --git a/librz/util/ht/ht_inc.c b/librz/util/ht/ht_inc.c index 9e7b400bf8f..e436287a331 100644 --- a/librz/util/ht/ht_inc.c +++ b/librz/util/ht/ht_inc.c @@ -646,17 +646,11 @@ RZ_API RZ_OWN HT_(IterState) *Ht_(new_iter_state)(const RZ_NONNULL HtName_(Ht) * return state; } -RZ_API void Ht_(free_iter_mut_state)(HT_(IterMutState) *state) { - if (!state) { - return; - } +RZ_API void Ht_(free_iter_mut_state)(RZ_NULLABLE HT_(IterMutState) *state) { free(state); } RZ_API void Ht_(free_iter_state)(RZ_NULLABLE HT_(IterState) *state) { - if (!state) { - return; - } free(state); }