qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] console: fix -vga none -sdl crash
@ 2014-06-02 12:10 Gerd Hoffmann
  2014-06-03  9:45 ` BALATON Zoltan
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2014-06-02 12:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] console: fix -vga none -sdl crash
  2014-06-02 12:10 [Qemu-devel] [PATCH] console: fix -vga none -sdl crash Gerd Hoffmann
@ 2014-06-03  9:45 ` BALATON Zoltan
  0 siblings, 0 replies; 2+ messages in thread
From: BALATON Zoltan @ 2014-06-03  9:45 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Anthony Liguori



On Mon, 2 Jun 2014, Gerd Hoffmann wrote:
> Call get_alloc_displaystate() for proper initialization
> instead of allocating with g_new().
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Tested-by: BALATON Zoltan <balaton@eik.bme.hu>

> ---
> 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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-03  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 12:10 [Qemu-devel] [PATCH] console: fix -vga none -sdl crash Gerd Hoffmann
2014-06-03  9:45 ` BALATON Zoltan

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).