Skip to content

Commit

Permalink
fix ddsrt_getprocessname() for FreeRTOS
Browse files Browse the repository at this point in the history
  • Loading branch information
CenTr1X authored and eboasson committed Oct 24, 2023
1 parent 1a84eb4 commit 49f87b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ddsrt/src/process/freertos/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <FreeRTOS.h>
#include <task.h>
Expand All @@ -22,5 +23,5 @@ ddsrt_getpid(void)
char *
ddsrt_getprocessname(void)
{
return pcTaskGetName(xTaskGetCurrentTaskHandle());
return ddsrt_strdup(pcTaskGetName(xTaskGetCurrentTaskHandle()));
}

0 comments on commit 49f87b5

Please sign in to comment.