[Spice-devel] [PATCH] fix possible core calling timer callback
Frediano Ziglio
fziglio at redhat.com
Fri Feb 19 13:02:22 UTC 2016
Was possible to have ping_timer_cb called with a NULL pointer.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/main-channel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/main-channel.c b/server/main-channel.c
index 6a36ce5..52a0078 100644
--- a/server/main-channel.c
+++ b/server/main-channel.c
@@ -1090,7 +1090,7 @@ static MainChannelClient *main_channel_client_create(MainChannel *main_chan, Red
mcc->bitrate_per_sec = ~0;
#ifdef RED_STATISTICS
core = reds_get_core_interface(red_channel_get_server(&main_chan->base));
- if (!(mcc->ping_timer = core->timer_add(core, ping_timer_cb, NULL))) {
+ if (!(mcc->ping_timer = core->timer_add(core, ping_timer_cb, mcc))) {
spice_error("ping timer create failed");
}
mcc->ping_interval = PING_INTERVAL;
--
2.5.0
More information about the Spice-devel
mailing list