diff options
author | Harald Welte <laforge@osmocom.org> | 2020-11-26 09:30:37 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-11-30 13:29:33 +0000 |
commit | b6b82da56ce65cb075bdb6260ddb958476bf805a (patch) | |
tree | bedb0119eaad9f8758e4d6107dacaa9a0d41d87f | |
parent | 29b77a61ff353113af7e51a2586a57207b9b9838 (diff) |
frame_relay: Fix error path on ioctl() failure
We don't want to pass -EINVAL as file descriptor into the bind() call.
Closes: CID#215529
Change-Id: Ic4d411c0ade6867c4fe2c01eb3368e6420158724
-rw-r--r-- | src/gb/gprs_ns2_fr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c index 80e3366d..33152739 100644 --- a/src/gb/gprs_ns2_fr.c +++ b/src/gb/gprs_ns2_fr.c @@ -319,7 +319,7 @@ static int open_socket(const char *ifname) "cannot set this socket unblocking: %s\n", strerror(errno)); close(fd); - fd = -EINVAL; + return -EINVAL; } rc = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); |