[PATCH] fix possible core calling timer callback

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

 



Was possible to have ping_timer_cb called with a NULL pointer.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]