qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] main: allocate gui_timer only once.
@ 2010-05-27  5:38 Isaku Yamahata
  2010-06-10 18:15 ` Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: Isaku Yamahata @ 2010-05-27  5:38 UTC (permalink / raw)
  To: qemu-devel

fix memory leak.
there is no need to allocate more than one gui_timer.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] main: allocate gui_timer only once.
  2010-05-27  5:38 [Qemu-devel] [PATCH] main: allocate gui_timer only once Isaku Yamahata
@ 2010-06-10 18:15 ` Blue Swirl
  0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2010-06-10 18:15 UTC (permalink / raw)
  To: Isaku Yamahata; +Cc: qemu-devel

Thanks, applied.

On Thu, May 27, 2010 at 5:38 AM, Isaku Yamahata <yamahata@valinux.co.jp> wrote:
> fix memory leak.
> there is no need to allocate more than one gui_timer.
>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> ---
>  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
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-10 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27  5:38 [Qemu-devel] [PATCH] main: allocate gui_timer only once Isaku Yamahata
2010-06-10 18:15 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).