From c11e6399997acde549a2f890d62c8eb26b74c2a5 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 e750c2c67..10f2bdd28 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1270,7 +1270,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;