composetable: Fix a memory leak
authorMatthias Clasen <mclasen@redhat.com>
Fri, 18 Nov 2022 04:21:19 +0000 (23:21 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 18 Nov 2022 05:04:23 +0000 (00:04 -0500)
Pointed out by clang.

gtk/gtkcomposetable.c

index 0a4f8fd750d4fe93b669ec0dccca130a9750c9c7..37a70ec6a648b56fd0fcccd241ef24457bf00ae9 100644 (file)
@@ -963,6 +963,7 @@ parser_get_compose_table (GtkComposeParser *parser)
           if (char_data->len >= 0x8000)
             {
               g_warning ("GTK can't handle compose tables this large (%s)", parser->compose_file ? parser->compose_file : "");
+              g_free (data);
               g_string_free (char_data, TRUE);
               return NULL;
             }