Stefan Sperling has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/11632/1

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: newchange
Gerrit-Change-Id: Icf5584396c5b925d55ca9380dd4f869ae5d72da3
Gerrit-Change-Number: 11632
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <[email protected]>

Reply via email to