提交 0f2ad63f 编写于 作者: I Isaku Yamahata 提交者: Blue Swirl

main: allocate gui_timer only once.

fix memory leak.
there is no need to allocate more than one gui_timer.
Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 60a3992e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册