Change in osmo-pcu[master]: Revert "coverity: fix null deref from recent UL TBF leak fix"

pespin gerrit-no-reply at lists.osmocom.org
Mon Aug 23 16:27:59 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25221 )

Change subject: Revert "coverity: fix null deref from recent UL TBF leak fix"
......................................................................

Revert "coverity: fix null deref from recent UL TBF leak fix"

This reverts commit 3bd648888910d8135e78c02b2f123163ac0ff2a3.

Change-Id: I59c4ae726286216850ad9b53fee34ab4bda5630f
---
M src/bts.cpp
1 file changed, 3 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



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

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25221
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I59c4ae726286216850ad9b53fee34ab4bda5630f
Gerrit-Change-Number: 25221
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210823/5d6d0323/attachment.htm>


More information about the gerrit-log mailing list