diff --git a/daemon/media_socket.c b/daemon/media_socket.c index e357cf0ad..f37f18071 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -3991,8 +3991,6 @@ stream_fd *stream_fd_lookup(const endpoint_t *ep) { } void stream_fd_release(stream_fd *sfd) { - if (!sfd) - return; if (sfd->socket.fd == -1) return; diff --git a/include/media_socket.h b/include/media_socket.h index 318b2ce92..c60269cf6 100644 --- a/include/media_socket.h +++ b/include/media_socket.h @@ -392,7 +392,10 @@ bool get_consecutive_ports(socket_port_q *out, unsigned int num_ports, struct lo stream_fd *stream_fd_new(struct socket_port_link *, call_t *call, struct local_intf *lif); stream_fd *stream_fd_lookup(const endpoint_t *); + +__attribute__((nonnull(1))) void stream_fd_release(stream_fd *); + enum thread_looper_action release_closed_sockets(void); void append_thread_lpr_to_glob_lpr(void);