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
This commit is contained in:
Pau Espin 2017-04-06 18:40:25 +02:00
parent 166a3767bd
commit 46fea15afc
1 changed files with 1 additions and 0 deletions

View File

@ -409,4 +409,5 @@ out_user:
osmo_sua_user_destroy(cnlink->sua_user);
out_free:
talloc_free(cnlink);
return NULL;
}