rcutils_join_path now returns a char *. (#174)
So we no longer have to cast away the const when freeing the memory. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This commit is contained in:
parent
ffcfc34890
commit
9f2010d6f3
1 changed files with 2 additions and 2 deletions
|
@ -69,9 +69,9 @@ const char * rcl_get_secure_root(const char * node_name)
|
|||
if (!ros_secure_root_size) {
|
||||
return NULL; // environment variable was empty
|
||||
}
|
||||
const char * node_secure_root = rcutils_join_path(ros_secure_root_env, node_name);
|
||||
char * node_secure_root = rcutils_join_path(ros_secure_root_env, node_name);
|
||||
if (!rcutils_is_directory(node_secure_root)) {
|
||||
free((char *)node_secure_root);
|
||||
free(node_secure_root);
|
||||
return NULL;
|
||||
}
|
||||
return node_secure_root;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue