abis: Fix memory leak of bts->osmo_link upon link going down

Commit below (see "Fixes" section) wrongly erased the code re-introduced
in this commit, due to not spotting different between "oml_link" and
"osmo_link". This commit is hence a revert of such commit, updated to
current code.

Fixes: c2ba34d9c1
Change-Id: Id436116e5cd0bec024b2f9943fbff8d0bdc956ac
This commit is contained in:
Pau Espin 2021-09-22 19:04:09 +02:00
parent 2e90e0f756
commit 127e8fc416
1 changed files with 7 additions and 0 deletions

View File

@ -102,6 +102,13 @@ static void reset_oml_link(struct gsm_bts *bts)
bts->oml_link = NULL;
}
memset(&bts->oml_conn_established_timestamp, 0, sizeof(bts->oml_conn_established_timestamp));
/* Same for IPAC_PROTO_OSMO on the same ipa connection: */
if (bts->osmo_link) {
e1inp_sign_link_destroy(bts->osmo_link);
bts->osmo_link = NULL;
}
}
static int pick_next_bsc(struct osmo_fsm_inst *fi)