From 3b2876086b2c5a23a82d70eeb9f2b68c833c2809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sat, 6 May 2023 20:37:28 +0400 Subject: [PATCH] audio/pw: needless check for NULL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- audio/pwaudio.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; }