]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ui/vnc-jobs: vnc_has_job_locked() argument cannot be NULL
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 13 Mar 2026 19:09:08 +0000 (23:09 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 22 Apr 2026 08:47:54 +0000 (12:47 +0400)
The only caller, vnc_jobs_join() cannot take vs == NULL argument, or it
would later crash.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
ui/vnc-jobs.c

index 4dd7ccad96973c9d9985671e3045a0cb1c37cc9f..8cb30e7227653d7689f0db4fde2945491a80174d 100644 (file)
@@ -138,7 +138,7 @@ static bool vnc_has_job_locked(VncState *vs)
     VncJob *job;
 
     QTAILQ_FOREACH(job, &queue->jobs, next) {
-        if (job->vs == vs || !vs) {
+        if (job->vs == vs) {
             return true;
         }
     }