Received: from eggs.gnu.org ([2001:4830:134:3::10]:35547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrlHO-00015H-Op for qemu-devel@nongnu.org; Tue, 03 Jun 2014 05:45:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrlHJ-0000CW-Ru for qemu-devel@nongnu.org; Tue, 03 Jun 2014 05:45:14 -0400 Received: from jedlik.phy.bme.hu ([152.66.102.83]:39086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrlHJ-0008RQ-Kw for qemu-devel@nongnu.org; Tue, 03 Jun 2014 05:45:09 -0400 Date: Tue, 3 Jun 2014 11:45:00 +0200 (CEST) From: BALATON Zoltan In-Reply-To: <1401711058-22121-1-git-send-email-kraxel@redhat.com> Message-ID: References: <1401711058-22121-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [Qemu-devel] [PATCH] console: fix -vga none -sdl crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, 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 Tested-by: BALATON Zoltan > --- > 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 > >