aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2022-12-18 20:42:14 +0300
committerlaforge <laforge@osmocom.org>2023-02-10 11:43:20 +0000
commit30b6d6134dea59ecd1eecd95d49921d6b061bde3 (patch)
tree659e119120747e8d4cc9265a92e4c5f5c4595224
parente63329eb1fdb417fec3c1f43827a1011d649895d (diff)
osmo_stream_srv_link_close(): properly handle NULL input
-rw-r--r--src/stream.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stream.c b/src/stream.c
index feb6c22..85779db 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1272,6 +1272,9 @@ int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link)
* \param[in] link Stream Server Link to close */
void osmo_stream_srv_link_close(struct osmo_stream_srv_link *link)
{
+ if (!link)
+ return;
+
if (link->ofd.fd == -1)
return;
osmo_fd_unregister(&link->ofd);