diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 254614b10c4a3bdb33c01f2c0f87d6da22d0315e..950f296dfcf7a402ebbad0df1edf16e4d62a52bd 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c @@ -644,7 +644,7 @@ static char *compact_gfp_flags(char *gfp_flags) { char *orig_flags = strdup(gfp_flags); char *new_flags = NULL; - char *str, *pos; + char *str, *pos = NULL; size_t len = 0; if (orig_flags == NULL)