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-21 19:07:54 +0200
commit367cca831bd5cfc68a4635e89c692c29d3ead8be (patch)
tree8f3b44cf08303607f40ae5a4e617550345487b28
parentce932198e82c24c086dd4fd37e378fef94006d71 (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;