From 91be4b1f3cdb22e591d9255c9727e0ccb9ad64a9 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 23 Nov 2021 10:27:16 -0500 Subject: [PATCH] TT#14008 fix possible segfault Not only check for the presence of a sink, but also check for a sink FD. Treat a sink without an FD as if there is no sink. Closes #1401 Change-Id: I04c0be33f8cae39399674ca0a87185a729daa843 (cherry picked from commit 179b7edec153ebeebd8385b2d59c6a117cff5d2d) --- daemon/media_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 3311db558..991856756 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1258,7 +1258,7 @@ static const char *kernelize_one(struct rtpengine_target_info *reti, GQueue *out output: // output section - if (non_forwarding) // also applies to sink == NULL + if (non_forwarding || !sink || !sink->selected_sfd) return NULL; // no output if (!PS_ISSET(sink, FILLED)) return NULL;