fixeria has uploaded this change for review.
handover_fsm: send_handover_performed(): check lchan != NULL
The target lchan is expected to be valid on HO_RESULT_OK, but it's
still safer to check it against NULL before dereferencing.
Change-Id: Iee734c98dc79681808e7d75360c208a941cc6821
Related: 107391d8c ("handover_fsm: fix send_handover_performed() using wrong lchan")
---
M src/osmo-bsc/handover_fsm.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/99/42599/1
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index cddb138..2017637 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -905,6 +905,11 @@
struct gsm0808_speech_codec sc;
int rc;
+ if (lchan == NULL) {
+ LOG_HO(conn, LOGL_ERROR, "Target lchan is NULL, can't send HANDOVER PERFORMED!\n");
+ return;
+ }
+
/* Cause 3.2.2.5 */
ho_perf_params.cause = GSM0808_CAUSE_HANDOVER_SUCCESSFUL;
To view, visit change 42599. To unsubscribe, or for help writing mail filters, visit settings.