From patchwork Thu May 27 05:38:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 53687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 533EAB7D2D for ; Thu, 27 May 2010 16:10:15 +1000 (EST) Received: from localhost ([127.0.0.1]:33952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHWF0-0003j2-08 for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 02:06:50 -0400 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 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id A5A2B1867D; Thu, 27 May 2010 14:42:08 +0900 (JST) Received: (nullmailer pid 13247 invoked by uid 1000); Thu, 27 May 2010 05:38:47 -0000 Date: Thu, 27 May 2010 14:38:47 +0900 From: Isaku Yamahata To: qemu-devel@nongnu.org Message-ID: <20100527053847.GD31807@valinux.co.jp> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH] main: allocate gui_timer only once. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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; }