Change in libosmocore[master]: frame_relay: prevent null pointer exception when talloc fails

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 Dec 23 11:27:11 UTC 2020


lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21843 )

Change subject: frame_relay: prevent null pointer exception when talloc fails
......................................................................

frame_relay: prevent null pointer exception when talloc fails

Change-Id: Ib39682ad0c7f30c97303b3d0bb6240fddd23ec0b
---
M src/gb/frame_relay.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  daniel: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/gb/frame_relay.c b/src/gb/frame_relay.c
index ae6bbf5..0304882 100644
--- a/src/gb/frame_relay.c
+++ b/src/gb/frame_relay.c
@@ -849,6 +849,8 @@
 struct osmo_fr_network *osmo_fr_network_alloc(void *ctx)
 {
 	struct osmo_fr_network *net = talloc_zero(ctx, struct osmo_fr_network);
+	if (!net)
+		return NULL;
 
 	INIT_LLIST_HEAD(&net->links);
 	net->T_defs = fr_tdefs;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib39682ad0c7f30c97303b3d0bb6240fddd23ec0b
Gerrit-Change-Number: 21843
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201223/ec4b25c3/attachment.htm>


More information about the gerrit-log mailing list