Revert "coverity: fix null deref from recent UL TBF leak fix"
This reverts commit 3bd648888910d8135e78c02b2f123163ac0ff2a3.
Change-Id: I59c4ae726286216850ad9b53fee34ab4bda5630f
diff --git a/src/bts.cpp b/src/bts.cpp
index daa8ee1..0453e4e 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1165,16 +1165,13 @@
{
struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_no].pdch[ts];
struct pdch_ulc_node *poll = pdch_ulc_get_node(pdch->ulc, fn);
- struct gprs_rlcmac_ul_tbf *ul_tbf;
+ struct gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(poll->tbf_poll.poll_tbf);
if (!poll || poll->type !=PDCH_ULC_NODE_TBF_POLL ||
- poll->tbf_poll.poll_tbf->direction != GPRS_RLCMAC_UL_TBF) {
+ poll->tbf_poll.poll_tbf->direction != GPRS_RLCMAC_UL_TBF)
LOGP(DL1IF, LOGL_DEBUG, "[%s] update TA = %u ignored due to "
"unknown UL TBF on TRX = %d, TS = %d, FN = %d\n",
p, ta, trx_no, ts, fn);
- return;
- }
- ul_tbf = as_ul_tbf(poll->tbf_poll.poll_tbf);
- if (ul_tbf) {
+ else if (ul_tbf) {
/* we need to distinguish TA information provided by L1
* from PH-DATA-IND and PHY-RA-IND so that we can properly
* update TA for given TBF