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] [PULL 2/2] console: fix -vga none -sdl crash
Date: Tue, 10 Jun 2014 13:02:33 +0200 [thread overview]
Message-ID: <1402398153-18272-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1402398153-18272-1-git-send-email-kraxel@redhat.com>
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 b5dac64..7dc4c14 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1580,10 +1580,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 prev parent reply other threads:[~2014-06-10 11:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 11:02 [Qemu-devel] [PULL 0/2] console patches Gerd Hoffmann
2014-06-10 11:02 ` [Qemu-devel] [PULL 1/2] console: kill MAX_CONSOLES, alloc consoles dynamically Gerd Hoffmann
2014-06-10 11:02 ` Gerd Hoffmann [this message]
2014-06-10 11:47 ` [Qemu-devel] [PULL 0/2] console patches Peter Maydell
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=1402398153-18272-3-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).