aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-04-06 18:40:25 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-04-06 18:53:20 +0200
commit46fea15afc38fb995baf4100f4de1d6a3565899f (patch)
tree69390674b31c93c9cd469c488b5b78dc64373c05
parent166a3767bdab6f9b45b1b401cccea6aba3c0b201 (diff)
hnbgw: Fix crash if cnlink fails to connect
Return NULL in the error code path, otherwise an uninitialized pointer is returned and later accessed when a UE tries to register using the cnlink. Change-Id: I4f3e2e0680de3216e2e569958bd64f70dc30c2a3
-rw-r--r--src/hnbgw_cn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c
index 0e993e2..4e5b2e0 100644
--- a/src/hnbgw_cn.c
+++ b/src/hnbgw_cn.c
@@ -409,4 +409,5 @@ out_user:
osmo_sua_user_destroy(cnlink->sua_user);
out_free:
talloc_free(cnlink);
+ return NULL;
}