Message ID | 20200129095421.881786-2-tz.stoyanov@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 7382783aeb71e18b7c64f0cce5a967352217268c |
Headers | show |
Series | libtracefs: few fixes and a lot of unit tests | expand |
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) {
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@gmail.com> --- lib/tracefs/tracefs-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)