Skip to content

Commit

Permalink
fix: delete sub_info in remove_all_topics (#344)
Browse files Browse the repository at this point in the history
delete sub_info in remove_all_topics

Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp>
  • Loading branch information
Koichi98 authored Jan 31, 2025
1 parent 51addd2 commit 4c9fbc9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kmod/agnocast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,15 @@ static void remove_all_topics(void)
kfree(pub_info);
}

struct subscriber_info * sub_info;
int bkt_sub_info;
struct hlist_node * tmp_sub_info;
hash_for_each_safe(wrapper->topic.sub_info_htable, bkt_sub_info, tmp_sub_info, sub_info, node)
{
hash_del(&sub_info->node);
kfree(sub_info);
}

hash_del(&wrapper->node);
kfree(wrapper->key);
kfree(wrapper);
Expand Down

0 comments on commit 4c9fbc9

Please sign in to comment.