aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15/l1_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-litecell15/l1_if.c')
-rw-r--r--src/osmo-bts-litecell15/l1_if.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index da63e005..21d047a5 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -466,10 +466,13 @@ static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
if (!nmsg)
return -ENOMEM;
l1p = msgb_l1prim(nmsg);
- l1if_tch_encode(lchan,
- l1p->u.phDataReq.msgUnitParam.u8Buffer,
- &l1p->u.phDataReq.msgUnitParam.u8Size,
- msg->data, msg->len, u32Fn);
+ if (!l1if_tch_encode(lchan,
+ l1p->u.phDataReq.msgUnitParam.u8Buffer,
+ &l1p->u.phDataReq.msgUnitParam.u8Size,
+ msg->data, msg->len, u32Fn)) {
+ msgb_free(nmsg);
+ nmsg = NULL;
+ }
}
/* no message/data, we generate an empty traffic msg */