sba: fix possible memleak in SBAController::alloc()

Change-Id: I417eda155cd5b1e46dd0b05db3f507abd79121d1
This commit is contained in:
Vadim Yanitskiy 2020-04-05 03:19:43 +07:00
parent a4e8c10a38
commit 72ec18ce5a
1 changed files with 3 additions and 3 deletions

View File

@ -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];