commit | 46fea15afc38fb995baf4100f4de1d6a3565899f | [log] [tgz] |
---|---|---|
author | Pau Espin Pedrol <pespin@sysmocom.de> | Thu Apr 06 18:40:25 2017 +0200 |
committer | Pau Espin Pedrol <pespin@sysmocom.de> | Thu Apr 06 18:53:20 2017 +0200 |
tree | 69390674b31c93c9cd469c488b5b78dc64373c05 | |
parent | 166a3767bdab6f9b45b1b401cccea6aba3c0b201 [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
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 @@ osmo_sua_user_destroy(cnlink->sua_user); out_free: talloc_free(cnlink); + return NULL; }