diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2021-02-28 23:42:53 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-03-03 07:50:00 +0000 |
commit | 3255668afb8c0f3bcf028a711176b00540d97eb2 (patch) | |
tree | 570b8434205ae3e436592a6162386d8f7e245915 /src | |
parent | 5baa1413152fd4864a1cb1b49c8332a434e79565 (diff) |
gprs_ns2: don't OSMO_ASSERT() while freeing NS-VC.
When freeing the NS-VC there are cases when the NSE is still alive.
This means that gprs_ns2_free_nsvc() calls ns2_prim_status_ind(),
which in turn calls ns2_count_transfer_cap(). The latter must deal
with such a situation rather than OSMO_ASSERT()
Change-Id: I4f32dee705c9886717339fe7cce5b4cd8d2c18f7
Diffstat (limited to 'src')
-rw-r--r-- | src/gb/gprs_ns2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index a79dd05f..c56b0b51 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -1455,8 +1455,9 @@ int ns2_count_transfer_cap(struct gprs_ns2_nse *nse, if (ns2_vc_is_unblocked(nsvc)) active_nsvcs++; } - /* an alive nse should always have active_nsvcs */ - OSMO_ASSERT(active_nsvcs); + + if (!active_nsvcs) + return 0; active_binds = talloc_zero_array(nse, struct gprs_ns2_vc_bind*, active_nsvcs); if (!active_binds) |