diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 5da243676f128988c7e427c80287681a6bc949e9..181d65e5a45054cc93263bf7fbf15ec89d3e30b1 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -3837,6 +3837,9 @@ int cmd_script(int argc, const char **argv)
 	if (err)
 		goto out_delete;
 
+	if (zstd_init(&(session->zstd_data), 0) < 0)
+		pr_warning("Decompression initialization failed. Reported data may be incomplete.\n");
+
 	err = __cmd_script(&script);
 
 	flush_scripting();