Skip to content

Commit 2dddd20

Browse files
tomiy-0x62Copilot
andcommitted
fix memory leak
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: tomiy <tomiy@tomiylab.com>
1 parent fc1151e commit 2dddd20

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

agnocast_kmod/agnocast_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ static int insert_subscriber_info(
297297
"bound (MAX_TOPIC_LOCAL_ID=%d), so no new subscriber can be "
298298
"added. (insert_subscriber_info)\n",
299299
new_id, wrapper->key, MAX_TOPIC_LOCAL_ID);
300+
kfree(node_name_copy);
301+
kfree(*new_info);
300302
return -ENOSPC;
301303
}
302304
set_bit(new_id, wrapper->topic.pubsub_id_map);

0 commit comments

Comments
 (0)