The string, returned from this API must not be freed, as it is a pointer to a local static variable. This was not explicitly stated in the description of the API. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> --- lib/tracefs/tracefs-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tracefs/tracefs-utils.c b/lib/tracefs/tracefs-utils.c index 658c852..de46aab 100644 --- a/lib/tracefs/tracefs-utils.c +++ b/lib/tracefs/tracefs-utils.c @@ -133,7 +133,7 @@ char *tracefs_find_tracing_dir(void) * tracefs_get_tracing_dir - Get tracing directory * * Returns string containing the full path to the system's tracing directory. - * Must use tracefs_put_tracing_file() to free the returned string. + * The returned string must *not* be freed. */ const char *tracefs_get_tracing_dir(void) { -- 2.24.1