aboutsummaryrefslogtreecommitdiff
path: root/audio/pwaudio.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-05-06 20:37:28 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-07-17 15:22:56 +0400
commit3b2876086b2c5a23a82d70eeb9f2b68c833c2809 (patch)
tree6862f61b17a08954d9a98db6ffc96b58965dc5ff /audio/pwaudio.c
parent2d216959e1e065ccb5523e4ce67b6f9ad47b17eb (diff)
audio/pw: needless check for NULL
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>
Diffstat (limited to 'audio/pwaudio.c')
-rw-r--r--audio/pwaudio.c8
1 files 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;
}