aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_udp.c
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-11-18 23:56:45 +0100
committerlaforge <laforge@osmocom.org>2020-11-20 08:51:19 +0000
commitc06aa710d0507d49e669deac1c090ef91112cecd (patch)
tree100599bbf55c1c7efb6dcc19c37898002eb691de /src/gb/gprs_ns2_udp.c
parentc1c420ce3d24a99143125f40e7daf47b6f256585 (diff)
ns2: check if ns_vc_alloc() fails in bind_connect()
Diffstat (limited to 'src/gb/gprs_ns2_udp.c')
-rw-r--r--src/gb/gprs_ns2_udp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c
index 0676314e..26a04836 100644
--- a/src/gb/gprs_ns2_udp.c
+++ b/src/gb/gprs_ns2_udp.c
@@ -379,6 +379,9 @@ struct gprs_ns2_vc *gprs_ns2_ip_bind_connect(struct gprs_ns2_vc_bind *bind,
struct priv_vc *priv;
nsvc = ns2_vc_alloc(bind, nse, true);
+ if (!nsvc)
+ return NULL;
+
nsvc->priv = talloc_zero(bind, struct priv_vc);
if (!nsvc->priv) {
gprs_ns2_free_nsvc(nsvc);