Skip to content

Commit

Permalink
Fix memory leak in ServiceQueueTrajPoint.c
Browse files Browse the repository at this point in the history
A rosidl_runtime_c__String that was a member of a message was having an init() function called on it after the message was being created. But creating a message automatically initializes the string, so it was getting double initialized.
  • Loading branch information
jimmy-mcelwain committed Nov 13, 2024
1 parent 158321a commit ef0fe32
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/ServiceQueueTrajPoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void Ros_ServiceQueueTrajPoint_Initialize()

//--------------
g_messages_QueueTrajPoint.response = motoros2_interfaces__srv__QueueTrajPoint_Response__create();
rosidl_runtime_c__String__init(&g_messages_QueueTrajPoint.response->message);

//--------------
MOTOROS2_MEM_TRACE_REPORT(svc_queue_point_init);
Expand Down

0 comments on commit ef0fe32

Please sign in to comment.