summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/module.c b/tools/perf/util/module.c
index 8f81622..0d8c85d 100644
--- a/tools/perf/util/module.c
+++ b/tools/perf/util/module.c
@@ -423,7 +423,7 @@ static int mod_dso__load_module_paths(struct mod_dso *self)
len += strlen(uts.release);
len += strlen("/modules.dep");
- dpath = calloc(1, len);
+ dpath = calloc(1, len + 1);
if (dpath == NULL)
return err;
OpenPOWER on IntegriCloud