diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2020-04-05 03:19:43 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2020-04-20 11:25:05 +0700 |
commit | 72ec18ce5a7f4e873b6137460706f5ecc598e4dd (patch) | |
tree | 6229dfd39aaa3dc4e70313fe75975cbd52deb440 /src/sba.cpp | |
parent | a4e8c10a388763715849eb4bdf234395bd81d79f (diff) |
sba: fix possible memleak in SBAController::alloc()
Change-Id: I417eda155cd5b1e46dd0b05db3f507abd79121d1
Diffstat (limited to 'src/sba.cpp')
-rw-r--r-- | src/sba.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sba.cpp b/src/sba.cpp index 567babeb..32735e8c 100644 --- a/src/sba.cpp +++ b/src/sba.cpp @@ -55,13 +55,13 @@ int SBAController::alloc( int8_t trx, ts; uint32_t fn; + if (!gsm48_ta_is_valid(ta)) + return -EINVAL; + sba = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_sba); if (!sba) return -ENOMEM; - if (!gsm48_ta_is_valid(ta)) - return -EINVAL; - for (trx = 0; trx < 8; trx++) { for (ts = 7; ts >= 0; ts--) { pdch = &m_bts.bts_data()->trx[trx].pdch[ts]; |