Skip to content

Commit

Permalink
Merge pull request #14 from hsiaosiyuan0/fix/macos-crash
Browse files Browse the repository at this point in the history
fix: kid_hashmap_free unsafe foreach
  • Loading branch information
hsiaosiyuan0 authored Dec 11, 2023
2 parents b4b3861 + f6e6be2 commit ea09d49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/kid.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void kid_hashmap_del(KidHashmap *map, KidHashkey *key) {
void kid_hashmap_free(KidHashmap *map) {
struct KidListHead *el, *el1;
if (map->key_free) {
kid_list_for_each(el, &map->keys) {
kid_list_for_each_safe(el, el1, &map->keys) {
KidHashkey *k = kid_list_entry(el, KidHashkey, link);
map->key_free(k);
}
Expand Down

0 comments on commit ea09d49

Please sign in to comment.