From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PATCH] console: fix -vga none -sdl crash
Date: Mon, 2 Jun 2014 14:10:58 +0200 [thread overview]
Message-ID: <1401711058-22121-1-git-send-email-kraxel@redhat.com> (raw)
Call get_alloc_displaystate() for proper initialization
instead of allocating with g_new().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/console.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index 3bc18cf..2467ce4 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1547,10 +1547,7 @@ DisplayState *init_displaystate(void)
gchar *name;
int i;
- if (!display_state) {
- display_state = g_new0(DisplayState, 1);
- }
-
+ get_alloc_displaystate();
for (i = 0; i < nb_consoles; i++) {
if (consoles[i]->console_type != GRAPHIC_CONSOLE &&
consoles[i]->ds == NULL) {
--
1.8.3.1
next reply other threads:[~2014-06-02 12:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 12:10 Gerd Hoffmann [this message]
2014-06-03 9:45 ` [Qemu-devel] [PATCH] console: fix -vga none -sdl crash BALATON Zoltan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401711058-22121-1-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).