[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] fix leaks found wtih fuzzing
From: |
Dmitry Frolov |
Subject: |
[PATCH] fix leaks found wtih fuzzing |
Date: |
Thu, 24 Aug 2023 17:08:39 +0300 |
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 <frolov@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
- [PATCH] fix leaks found wtih fuzzing,
Dmitry Frolov <=