diff options
author | Max <msuraev@sysmocom.de> | 2022-12-18 20:42:14 +0300 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2023-02-10 11:43:20 +0000 |
commit | 30b6d6134dea59ecd1eecd95d49921d6b061bde3 (patch) | |
tree | 659e119120747e8d4cc9265a92e4c5f5c4595224 | |
parent | e63329eb1fdb417fec3c1f43827a1011d649895d (diff) |
osmo_stream_srv_link_close(): properly handle NULL input
Related: OS#5568
Change-Id: Ie15bb3dc99bfe18065e03fde68d517b0d389b7ad
-rw-r--r-- | src/stream.c | 3 |
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); |