tbf: Avoid crash: don't set TBF window size if setup failed

Should fix assertion triggered due to the tbf not set up properly
beforehand.

Fixes: OS#4524
Change-Id: I267b147520ef5a50f40ad4bc19e7b5fb3e708127
This commit is contained in:
Pau Espin 2020-05-08 13:50:51 +02:00
parent 20331ae5f6
commit acd67cbdf1
1 changed files with 3 additions and 3 deletions

View File

@ -1014,15 +1014,15 @@ struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs
rc = setup_tbf(tbf, ms, use_trx, ms_class, egprs_ms_class, single_slot);
if (tbf->is_egprs_enabled())
tbf->set_window_size();
/* if no resource */
if (rc < 0) {
talloc_free(tbf);
return NULL;
}
if (tbf->is_egprs_enabled())
tbf->set_window_size();
tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(tbf,
&tbf_ul_egprs_ctrg_desc, tbf->m_ctrs->idx);
tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(tbf,