[Spice-commits] server/main-channel.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Sat Feb 20 13:17:17 UTC 2016


 server/main-channel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 39ab6b3279b252f0c2958ce9d7e0cbee1408d11e
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Feb 19 13:02:10 2016 +0000

    fix possible core calling timer callback
    
    Was possible to have ping_timer_cb called with a NULL pointer.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

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;


More information about the Spice-commits mailing list