Skip to content

Commit 6c228a6

Browse files
committed
fix memory leak
Signed-off-by: tomiy <tomiy@tomiylab.com>
1 parent 2dddd20 commit 6c228a6

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
@@ -413,6 +413,8 @@ static int insert_publisher_info(
413413
"bound (MAX_TOPIC_LOCAL_ID=%d), so no new publisher can be "
414414
"added. (insert_publisher_info)\n",
415415
new_id, wrapper->key, MAX_TOPIC_LOCAL_ID);
416+
kfree(node_name_copy);
417+
kfree(*new_info);
416418
return -ENOSPC;
417419
}
418420
set_bit(new_id, wrapper->topic.pubsub_id_map);

0 commit comments

Comments
 (0)