Fix leak of ns_with_separators
This commit is contained in:
parent
31079577b8
commit
beee7c22ee
1 changed files with 1 additions and 4 deletions
|
@ -93,10 +93,7 @@ const char * rcl_create_node_logger_name(
|
||||||
// Join the namespace and node name to create the logger name.
|
// Join the namespace and node name to create the logger name.
|
||||||
char * node_logger_name = rcutils_format_string(
|
char * node_logger_name = rcutils_format_string(
|
||||||
*allocator, "%s%s%s", ns_with_separators, RCUTILS_LOGGING_SEPARATOR_STRING, node_name);
|
*allocator, "%s%s%s", ns_with_separators, RCUTILS_LOGGING_SEPARATOR_STRING, node_name);
|
||||||
if (NULL == node_logger_name) {
|
|
||||||
allocator->deallocate((char *)ns_with_separators, allocator->state);
|
allocator->deallocate((char *)ns_with_separators, allocator->state);
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return node_logger_name;
|
return node_logger_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue