From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH 1/9] trace-cmd: fix description of tracefs_get_tracing_dir() API
Date: Wed, 29 Jan 2020 11:54:13 +0200 [thread overview]
Message-ID: <20200129095421.881786-2-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20200129095421.881786-1-tz.stoyanov@gmail.com>
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(-)
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
next prev parent reply other threads:[~2020-01-29 9:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 9:54 [PATCH 0/9] libtracefs: few fixes and a lot of unit tests Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` Tzvetomir Stoyanov (VMware) [this message]
2020-01-29 9:54 ` [PATCH 2/9] trace-cmd: Remove tracefs_read_page_record() API Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` [PATCH 3/9] trace-cmd: Add sanity check of tracefs_get_tracing_file() input parameter Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` [PATCH 4/9] trace-cmd: Unit test for libtracefs Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` [PATCH 5/9] trace-cmd: Unit tests for libtracefs APIs related to tracing file / directory Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` [PATCH 6/9] trace-cmd: Unit tests for libtracefs APIs related to ftrace instances Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` [PATCH 7/9] trace-cmd: Unit tests for libtracefs APIs related to ftrace events and systems Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` [PATCH 8/9] trace-cmd: Unit test for tracefs_tracers() API Tzvetomir Stoyanov (VMware)
2020-01-29 9:54 ` [PATCH 9/9] trace-cmd: Unit tests for libtracefs APIs related to allocating a tep handler based on local events Tzvetomir Stoyanov (VMware)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200129095421.881786-2-tz.stoyanov@gmail.com \
--to=tz.stoyanov@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).