diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-02 14:15:36 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-03 11:46:19 +0100 |
commit | 4573ca88345c553653eeea627cf4b51fa26ab9df (patch) | |
tree | 2f42390e8df2ca2e8c0bf5cbf29b6c1e083bef37 /openbsc/src | |
parent | 52c0bd3025f319597ce40621ef44e39e01594605 (diff) |
gtphub: fix: add a missing NULL check
Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/gprs/gtphub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index 6dc1ea0fb..78e8c90c6 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -1277,6 +1277,8 @@ static int gtphub_check_reused_teis(struct gtphub *hub, te = &tun->endpoint[side_idx][plane_idx]; te2 = &new_tun->endpoint[side_idx][plane_idx]; if ((te->tei_orig != te2->tei_orig) + || (!te->peer) + || (!te2->peer) || !gsn_addr_same(&te->peer->peer_addr->addr, &te2->peer->peer_addr->addr)) continue; |