[PATCH] rtla: fix double free
From: Andreas Schwab
Date: Mon Jul 25 2022 - 09:10:39 EST
Don't call trace_instance_destroy in trace_instance_init when it fails,
this is done by the caller.
Signed-off-by: Andreas Schwab <schwab@xxxxxxx>
---
tools/tracing/rtla/src/trace.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/tracing/rtla/src/trace.c b/tools/tracing/rtla/src/trace.c
index 5784c9f9e570..7c27fc2a52cb 100644
--- a/tools/tracing/rtla/src/trace.c
+++ b/tools/tracing/rtla/src/trace.c
@@ -179,7 +179,6 @@ int trace_instance_init(struct trace_instance *trace, char *tool_name)
return 0;
out_err:
- trace_instance_destroy(trace);
return 1;
}
--
2.37.1
--
Andreas Schwab, SUSE Labs, schwab@xxxxxxx
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."