diff --git a/src/ddsrt/src/process/freertos/process.c b/src/ddsrt/src/process/freertos/process.c index 7ad10eae84..2a39d8183a 100644 --- a/src/ddsrt/src/process/freertos/process.c +++ b/src/ddsrt/src/process/freertos/process.c @@ -9,6 +9,7 @@ // SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause #include "dds/ddsrt/process.h" +#include "dds/ddsrt/string.h" #include #include @@ -22,5 +23,5 @@ ddsrt_getpid(void) char * ddsrt_getprocessname(void) { - return pcTaskGetName(xTaskGetCurrentTaskHandle()); + return ddsrt_strdup(pcTaskGetName(xTaskGetCurrentTaskHandle())); }