diff options
author | Max <msuraev@sysmocom.de> | 2022-11-18 21:27:08 +0300 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2022-11-22 09:38:06 +0000 |
commit | a6db89089ed9fe3aaa6533e53bac621e9bea69f3 (patch) | |
tree | d9c650a5b1691a5cd88f5106b11580a639c13e0e | |
parent | 3d13c2bb4210298d1d62191c95291596b648c3c6 (diff) |
Add assert for link check to osmo_stream_srv_create()
We implicitly rely on conn->srv availability in several functions.
Let's ensure it's available in function creating conn.
Change-Id: If494eac5dcce6c5ae30e928b92e57067d5681a42
-rw-r--r-- | src/stream.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stream.c b/src/stream.c index 0086588..d3e9ad8 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1377,6 +1377,8 @@ osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, { struct osmo_stream_srv *conn; + OSMO_ASSERT(link); + conn = talloc_zero(ctx, struct osmo_stream_srv); if (conn == NULL) { LOGP(DLINP, LOGL_ERROR, "cannot allocate new peer in srv, " |