The input parameter "name" of tracefs_get_tracing_file() API is mandatory, it cannot be NULL. A check is added to verify this. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> --- lib/tracefs/tracefs-utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tracefs/tracefs-utils.c b/lib/tracefs/tracefs-utils.c index de46aab..227990a 100644 --- a/lib/tracefs/tracefs-utils.c +++ b/lib/tracefs/tracefs-utils.c @@ -161,6 +161,9 @@ char *tracefs_get_tracing_file(const char *name) char *file; int ret; + if (!name) + return NULL; + if (!tracing) { tracing = tracefs_find_tracing_dir(); if (!tracing) -- 2.24.1