Fuzzing causes thousands of identical crashes with message: "AddressSanitizer: 3744 byte(s) leaked in 1 allocation(s)"
Fixes: 060ab76356 ("gtk: don't exit early in case gtk init fails") Signed-off-by: Dmitry Frolov <fro...@swemel.ru> --- ui/gtk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 8ba41c8f13..996ca7949d 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2358,6 +2358,10 @@ static gboolean gtkinit; static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) { + if (!gtkinit) { + fprintf(stderr, "gtk initialization failed\n"); + exit(1); + } VirtualConsole *vc; GtkDisplayState *s = g_malloc0(sizeof(*s)); @@ -2365,10 +2369,6 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) GtkIconTheme *theme; char *dir; - if (!gtkinit) { - fprintf(stderr, "gtk initialization failed\n"); - exit(1); - } assert(opts->type == DISPLAY_TYPE_GTK); s->opts = opts; -- 2.34.1