laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30226 )
Change subject: Add assert for link check to osmo_stream_srv_create() ......................................................................
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 --- M src/stream.c 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
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 @@ { 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, "