Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11632 )

Change subject: prevent potential NULL dereference in virtbts's tx_tchh_fn
......................................................................

prevent potential NULL dereference in virtbts's tx_tchh_fn

If chan_state->ongoing_facch is set, this code's logic
suggests that both msg_facch and msg_tch could be NULL.
Don't dereference msg_tch unconditionally.

Change-Id: Icf5584396c5b925d55ca9380dd4f869ae5d72da3
Related: CID#172047
---
M src/osmo-bts-virtual/scheduler_virtbts.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, approved



diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c 
b/src/osmo-bts-virtual/scheduler_virtbts.c
index 2248afc..25f6583 100644
--- a/src/osmo-bts-virtual/scheduler_virtbts.c
+++ b/src/osmo-bts-virtual/scheduler_virtbts.c
@@ -463,7 +463,7 @@
        if (msg_facch) {
                tx_to_virt_um(l1t, tn, fn, chan, msg_facch);
                msgb_free(msg_tch);
-       } else
+       } else if (msg_tch)
                tx_to_virt_um(l1t, tn, fn, chan, msg_tch);

 send_burst:

--
To view, visit https://gerrit.osmocom.org/11632
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icf5584396c5b925d55ca9380dd4f869ae5d72da3
Gerrit-Change-Number: 11632
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-CC: Pau Espin Pedrol <[email protected]>

Reply via email to