qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] char-pty: fix glib assert


From: Juan Quintela
Subject: [Qemu-devel] [PATCH] char-pty: fix glib assert
Date: Mon, 29 Jan 2018 17:17:08 +0100

I am having this assert over and over:

(process:30804): GLib-CRITICAL **: g_source_unref: assertion 'source != NULL' 
failed

gdb points to the line changed on this patch, and my reading of
commit:

2c716ba1506769c9be2caa02f0f6d6e7c00f4304

is that it should be timer_src what is unrefered there.

But I don't claim to fully understand this code, so ....

Any comment?

Thanks, Juan.

Signed-off-by: Juan Quintela <address@hidden>
CC: Peter Xu <address@hidden>
CC: Paolo Bonzini <address@hidden>


---
 chardev/char-pty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chardev/char-pty.c b/chardev/char-pty.c
index 89315e6807..c26e02bce8 100644
--- a/chardev/char-pty.c
+++ b/chardev/char-pty.c
@@ -57,8 +57,8 @@ static gboolean pty_chr_timer(gpointer opaque)
     PtyChardev *s = PTY_CHARDEV(opaque);
 
     qemu_mutex_lock(&chr->chr_write_lock);
+    g_source_unref(s->timer_src);
     s->timer_src = NULL;
-    g_source_unref(s->open_source);
     s->open_source = NULL;
     if (!s->connected) {
         /* Next poll ... */
-- 
2.14.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]