[Spice-devel] [PATCH] fix possible core calling timer callback
Jonathon Jongsma
jjongsma at redhat.com
Fri Feb 19 21:42:03 UTC 2016
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Fri, 2016-02-19 at 13:02 +0000, Frediano Ziglio wrote:
> 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;
More information about the Spice-devel
mailing list