aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-21 15:10:23 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-24 12:23:50 +0200
commit6e013a136a9286e92cee0d9b5b4f0c7bcea5fd51 (patch)
tree6719b34b52c6266a88c1b5d1abb39080aa3db24e
parentaf387e2199de698fab9f180d68923c65b819be0c (diff)
bssgp: Only call bssgp_tx_llc_discarded if the bctx exists
While this does not happen in real use, and unset btcx can lead to segfaults in test cases. The other code outside of gprs_bssgp_pcu.cpp does not depend on bctx being non-NULL: Sponsored-by: On-Waves ehf
-rw-r--r--src/tbf_dl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index a0510f66..39a1f334 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -318,7 +318,8 @@ drop_frame:
frames = 0xff;
if (octets > 0xffffff)
octets = 0xffffff;
- bssgp_tx_llc_discarded(bctx, tlli(), frames, octets);
+ if (bctx)
+ bssgp_tx_llc_discarded(bctx, tlli(), frames, octets);
}
return msg;