From 995ebc7d9346e28e057c04b5c3e69a50ec35b5c8 Mon Sep 17 00:00:00 2001 From: Christian Spielberger Date: Tue, 12 Dec 2023 13:49:47 +0100 Subject: [PATCH] aur: correct err handling in aurecv_receive() Fixes the sanitizer warning "unlock of an unlocked mutex" --- src/aureceiver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/aureceiver.c b/src/aureceiver.c index 99497e9308..6592e6e38d 100644 --- a/src/aureceiver.c +++ b/src/aureceiver.c @@ -289,13 +289,13 @@ void aurecv_receive(struct audio_recv *ar, const struct rtp_header *hdr, (void) lostc; if (!mb) - goto out; + return; mtx_lock(ar->mtx); if (hdr->pt != ar->pt) { mtx_unlock(ar->mtx); *ignore = true; - goto unlock; + return; } *ignore = false; @@ -341,7 +341,6 @@ void aurecv_receive(struct audio_recv *ar, const struct rtp_header *hdr, return; } - out: /* TODO: what if lostc > 1 ?*/ /* PLC should generate lostc frames here. Not only one. * aubuf should replace PLC frames with late arriving real frames. @@ -351,7 +350,6 @@ void aurecv_receive(struct audio_recv *ar, const struct rtp_header *hdr, (void)aurecv_stream_decode(ar, hdr, mb, 0, drop); -unlock: mtx_unlock(ar->mtx); }