]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio/pw: needless check for NULL
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 6 May 2023 16:37:28 +0000 (20:37 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 17 Jul 2023 11:22:56 +0000 (15:22 +0400)
g_clear_pointer() already checks for NULL.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20230506163735.3481387-6-marcandre.lureau@redhat.com>

audio/pwaudio.c

index 51cfc0b0527ca634ad30594b84b406bf7d17176c..6ca4ef4f62534c56ab65113b7feb023c91c8402c 100644 (file)
@@ -834,12 +834,8 @@ fail:
     if (pw->thread_loop) {
         pw_thread_loop_stop(pw->thread_loop);
     }
-    if (pw->context) {
-        g_clear_pointer(&pw->context, pw_context_destroy);
-    }
-    if (pw->thread_loop) {
-        g_clear_pointer(&pw->thread_loop, pw_thread_loop_destroy);
-    }
+    g_clear_pointer(&pw->context, pw_context_destroy);
+    g_clear_pointer(&pw->thread_loop, pw_thread_loop_destroy);
     return NULL;
 }