Skip to content

Commit

Permalink
audio/pw: needless check for NULL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
elmarco committed Jul 17, 2023
1 parent 2d21695 commit 3b28760
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions audio/pwaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,12 +834,8 @@ qpw_audio_init(Audiodev *dev)
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;
}

Expand Down

0 comments on commit 3b28760

Please sign in to comment.