From d80b51f650943381e36d6ec5d4082d319812ceec Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 19 Nov 2023 20:27:48 +0000 Subject: [PATCH] server: Don't complete fb update more than once If stream_send in finish_fb_update returns -1, then complete_fb_update will be called there and in the callback to stream_send. --- src/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server.c b/src/server.c index 716b45f..ee8cafb 100644 --- a/src/server.c +++ b/src/server.c @@ -2002,6 +2002,8 @@ void nvnc_close(struct nvnc* self) static void complete_fb_update(struct nvnc_client* client) { + if (!client->is_updating) + return; client->is_updating = false; assert(client->current_fb); nvnc_fb_release(client->current_fb);