Change in libosmocore[master]: gb/gprs_bssgb: check if talloc failed on btsctx->fc

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Wed Sep 23 21:39:15 UTC 2020


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/20262 )


Change subject: gb/gprs_bssgb: check if talloc failed on btsctx->fc
......................................................................

gb/gprs_bssgb: check if talloc failed on btsctx->fc

Change-Id: I1cfccc2cb696d9e95f590b99559d0a987031adfe
---
M src/gb/gprs_bssgp.c
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/20262/1

diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 9c119fb..8df0006 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -150,7 +150,14 @@
 		talloc_free(ctx);
 		return NULL;
 	}
+
 	ctx->fc = talloc_zero(ctx, struct bssgp_flow_control);
+	if (!ctx->fc) {
+		rate_ctr_group_free(ctx->ctrg);
+		talloc_free(ctx);
+		return NULL;
+	}
+
 	/* cofigure for 2Mbit, 30 packets in queue */
 	bssgp_fc_init(ctx->fc, 100000, 2*1024*1024/8, 30, &_bssgp_tx_dl_ud);
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1cfccc2cb696d9e95f590b99559d0a987031adfe
Gerrit-Change-Number: 20262
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200923/7ed1f296/attachment.htm>


More information about the gerrit-log mailing list