Fix CID 1465231

-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmGKl7sSHGxhdXJlbnRA
 dml2aWVyLmV1AAoJEPMMOL0/L748IpgP/iYq+vnR1OUo+A1dedmDcxfNAIqc+URV
 Kqg/ZLzlSBulsDTIb21/0qnWQcf+rVhv+LUgYCZHA/E9yBjTO2TiYnjicqt03UZt
 2drZ8+uAR8JNISyb2Em2znZ9tHmmtZbESleugqNCUUi/9Eq8EjOkDTcRbH9y2Ury
 FpJzHodOFRmBERZSJafPn6wr6fL3sa7x5qWFoxQHmzsFsstnkvX9mrk5lNXB6wfH
 ckcUcL82ow5csXHfBzaotLF0rGfBZr9K2KtomQY6C7ksbq4gcFXPci/0rivxQxsB
 /zY3hp72TMHYV2K7DZA8NAeTiSzSxwe9kHqTLyMQc2+wSDpE3cqF/oK63WH/58+k
 GJLJr4L7pBQvjybotyyczVIDbpUsX8oLAfQgL7MxS1yUS4SsEfeTYr5dZy1Tjdo0
 H4QavndyM0Uxa1OCaBSeh+su5GIbJdijj0sgdIDDdClALmCxj2d/UlD/VdRUcWns
 9YUVrgfPzilXsve8bthcFqWSTqAssVavBJ7Q5qOwqHceLh6M18oNxayWqY76dyxV
 w2Kem1Ec6Ej90bH3+wUlRFbE/rz1dHqUkC9KmFB/rbAInSXHYTdkcw+hVQDcOIcg
 LzoSHqLCkJJ237Cp2TTHMgfSPIWWD1qzKtWQc7lh7diWiQWZpGrwcwWEJ9S/VnYz
 0nGmqzf6Kml+
 =3iNb
 -----END PGP SIGNATURE-----

Merge tag 'q800-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k into staging

Fix CID 1465231

# gpg: Signature made Tue 09 Nov 2021 04:46:03 PM CET
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]

* tag 'q800-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k:
  macfb: fix a memory leak (CID 1465231)

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2021-11-09 17:05:18 +01:00
commit 3871cfce1e

View File

@ -440,21 +440,18 @@ static MacFbMode *macfb_find_mode(MacfbDisplayType display_type,
static gchar *macfb_mode_list(void)
{
gchar *list = NULL;
gchar *mode;
GString *list = g_string_new("");
MacFbMode *macfb_mode;
int i;
for (i = 0; i < ARRAY_SIZE(macfb_mode_table); i++) {
macfb_mode = &macfb_mode_table[i];
mode = g_strdup_printf(" %dx%dx%d\n", macfb_mode->width,
g_string_append_printf(list, " %dx%dx%d\n", macfb_mode->width,
macfb_mode->height, macfb_mode->depth);
list = g_strconcat(mode, list, NULL);
g_free(mode);
}
return list;
return g_string_free(list, FALSE);
}