summaryrefslogtreecommitdiffhomepage
path: root/device.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2015-08-04 16:22:42 +0200
committerSteven Barth <steven@midlink.org>2015-08-25 08:23:19 +0200
commitf14e668cf0c6ebade6a4cef0ab66f13acf8e2046 (patch)
tree8ca28e799bd42ff6874c254339400a6f36888780 /device.c
parented92851c92617636d6f891b2e9926559feef9807 (diff)
netifd: Fix SEG fault when device cannot be allocated
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'device.c')
-rw-r--r--device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/device.c b/device.c
index b5bee11..6f31e36 100644
--- a/device.c
+++ b/device.c
@@ -741,6 +741,9 @@ device_reset_old(void)
continue;
ndev = device_create_default(dev->ifname, dev->external);
+ if (!ndev)
+ continue;
+
device_replace(ndev, dev);
}
}