diff options
author | Günther Kelleter <guenther.kelleter@devolo.de> | 2016-11-03 13:40:53 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-11-04 13:24:02 +0100 |
commit | 6cf66bb0a02f3993394c0408c2865bfaf2756f21 (patch) | |
tree | 853bdf8269d70ff306e47606ae8a90ef6e2518e2 /system-linux.c | |
parent | b8ef742bd04ebef324ae11aee56c6e1d2cb7e0ad (diff) |
system-linux: check for open failure
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/system-linux.c b/system-linux.c index 6e4a194..a038987 100644 --- a/system-linux.c +++ b/system-linux.c @@ -2489,6 +2489,8 @@ int system_update_ipv6_mtu(struct device *dev, int mtu) dev->ifname); int fd = open(buf, O_RDWR); + if (fd < 0) + return ret; if (!mtu) { ssize_t len = read(fd, buf, sizeof(buf) - 1); |