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
Tue Dec 22 14:45:09 UTC 2020


lynxis lazus has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/43/21843/1

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: 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/20201222/7b4c7026/attachment.htm>


More information about the gerrit-log mailing list