From: Marc-André Lureau Date: Sat, 6 May 2023 16:37:28 +0000 (+0400) Subject: audio/pw: needless check for NULL X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3b2876086b2c5a23a82d70eeb9f2b68c833c2809;p=qemu.git audio/pw: needless check for NULL g_clear_pointer() already checks for NULL. Signed-off-by: Marc-André Lureau Reviewed-by: Volker Rümelin Message-Id: <20230506163735.3481387-6-marcandre.lureau@redhat.com> --- diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 51cfc0b052..6ca4ef4f62 100644 --- a/audio/pwaudio.c +++ b/audio/pwaudio.c @@ -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; }