Received: from [140.186.70.92] (port=38554 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHW3f-0003dT-1B for qemu-devel@nongnu.org; Thu, 27 May 2010 01:55:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHVr7-0003k5-Tk for qemu-devel@nongnu.org; Thu, 27 May 2010 01:42:14 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:37013) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHVr7-0003k1-JI for qemu-devel@nongnu.org; Thu, 27 May 2010 01:42:09 -0400 Date: Thu, 27 May 2010 14:38:47 +0900 From: Isaku Yamahata Message-ID: <20100527053847.GD31807@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] main: allocate gui_timer only once. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org fix memory leak. there is no need to allocate more than one gui_timer. Signed-off-by: Isaku Yamahata --- vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 417554f..22cdf43 100644 --- a/vl.c +++ b/vl.c @@ -3794,6 +3794,7 @@ int main(int argc, char **argv, char **envp) if (dcl->dpy_refresh != NULL) { ds->gui_timer = qemu_new_timer(rt_clock, gui_update, ds); qemu_mod_timer(ds->gui_timer, qemu_get_clock(rt_clock)); + break; } dcl = dcl->next; } -- 1.6.6.1