aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-12-22 15:39:43 +0100
committerAlexander Couzens <lynxis@fe80.eu>2020-12-23 06:32:29 +0100
commite249e363395d91641ac83891301b1fc6676cc86b (patch)
tree99443bceb7131f8134ad82576f7ce97e350106af
parent280ed789a868ddf3b2538b31b1ae1350f3a65859 (diff)
frame_relay: prevent null pointer exception when talloc fails
-rw-r--r--src/gb/frame_relay.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gb/frame_relay.c b/src/gb/frame_relay.c
index ae6bbf58..03048827 100644
--- a/src/gb/frame_relay.c
+++ b/src/gb/frame_relay.c
@@ -849,6 +849,8 @@ static void fr_t392_cb(void *data)
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;