From 0f2ad63fcb75c9679ff7d47f6b2235dfc646de35 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Thu, 27 May 2010 14:38:47 +0900 Subject: [PATCH] main: allocate gui_timer only once. fix memory leak. there is no need to allocate more than one gui_timer. Signed-off-by: Isaku Yamahata Signed-off-by: Blue Swirl --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/vl.c index 6d08ec834a..3d7ce522b1 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; }