diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/vnc-jobs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 12389cc2e8..08f0163fbc 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -235,6 +235,14 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) vnc_unlock_output(job->vs); goto disconnected; } + if (buffer_empty(&job->vs->output)) { + /* + * Looks like a NOP as it obviously moves no data. But it + * moves the empty buffer, so we don't have to malloc a new + * one for vs.output + */ + buffer_move_empty(&vs.output, &job->vs->output); + } vnc_unlock_output(job->vs); /* Make a local copy of vs and switch output buffers */ |