T tracer tools: fix memory leaks, clang warnings

- Fix memory leaks detected by ASan
- Initialize variables that are flagged by compiler
- C struct initializer: x:y needs to be .x=y
This commit is contained in:
Cedric Roux
2023-07-13 10:29:33 +02:00
committed by Robert Schmidt
parent 5a98ead92b
commit 8a2a5015e6
6 changed files with 51 additions and 12 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ void send_event(gui *_gui, enum event_type type, ...)
struct gui *g = _gui;
int do_write = 0;
va_list ap;
struct event *e;
struct event *e = NULL; /* initialization not necessary but gcc is not happy */
if (g->queued_events == NULL) do_write = 1;