From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0Dk9-0004Fs-Mv for qemu-devel@nongnu.org; Wed, 12 Nov 2008 06:18:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0Dk9-0004Fg-2h for qemu-devel@nongnu.org; Wed, 12 Nov 2008 06:18:41 -0500 Received: from [199.232.76.173] (port=53322 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0Dk8-0004Fd-V5 for qemu-devel@nongnu.org; Wed, 12 Nov 2008 06:18:40 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:1186 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0Dk8-0000gd-IY for qemu-devel@nongnu.org; Wed, 12 Nov 2008 06:18:40 -0500 Message-ID: <491ABC5F.9030504@eu.citrix.com> Date: Wed, 12 Nov 2008 11:22:07 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] fix some variable initizalization issues References: <49103994.5090406@eu.citrix.com> In-Reply-To: <49103994.5090406@eu.citrix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I think this patch should be applied, makes valgrind happier :) Stefano Stabellini wrote: > Hi all, > this patch fixes two variable initialization issues. > > Signed-off-by: Stefano Stabellini > > --- > > diff --git a/hw/vga.c b/hw/vga.c > index 9540db0..ca8acfe 100644 > --- a/hw/vga.c > +++ b/hw/vga.c > @@ -2396,7 +2396,7 @@ static void vga_save_dpy_update(DisplayState *s, > static void vga_save_dpy_resize(DisplayState *s, int w, int h) > { > s->linesize = w * 4; > - s->data = qemu_malloc(h * s->linesize); > + s->data = qemu_mallocz(h * s->linesize); > vga_save_w = w; > vga_save_h = h; > } > diff --git a/qemu-char.c b/qemu-char.c > index ceffbed..be40cee 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -935,6 +935,7 @@ static CharDriverState *qemu_chr_open_pty(void) > } > > /* Set raw attributes on the pty. */ > + tcgetattr(slave_fd, &tty); > cfmakeraw(&tty); > tcsetattr(slave_fd, TCSAFLUSH, &tty); > close(slave_fd); > > >