aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gtphub.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-01-30 10:09:00 +0100
committerMax <msuraev@sysmocom.de>2018-01-30 10:09:00 +0100
commitb643f56ebe4ff7e12ae7e44938f895b474f38ed6 (patch)
tree3a4393177f1f3ffe651c18c3d1436eac07a4f5ba /src/gprs/gtphub.c
parent99f99535e52e665cfd1da38d2c9842fd12b13420 (diff)
gtphub: check for gsn_addr_from_sockaddr() error
Change-Id: I2d80b5a488e7daa0bc8f57ea304e0e1f10f6c1f5 Fixes: CID182472
Diffstat (limited to 'src/gprs/gtphub.c')
-rw-r--r--src/gprs/gtphub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c
index 2ff1b7cd..4ee20cdc 100644
--- a/src/gprs/gtphub.c
+++ b/src/gprs/gtphub.c
@@ -2649,7 +2649,9 @@ struct gtphub_peer_port *gtphub_port_find_sa(const struct gtphub_bind *bind,
{
struct gsn_addr gsna;
uint16_t port;
- gsn_addr_from_sockaddr(&gsna, &port, addr);
+ if (gsn_addr_from_sockaddr(&gsna, &port, addr) != 0)
+ return NULL;
+
return gtphub_port_find(bind, &gsna, port);
}