[OpenWrt-Devel] [PATCH 1/4] netifd: Fix SEG fault when device cannot be allocated

Hans Dedecker dedeckeh at gmail.com
Tue Aug 4 10:22:42 EDT 2015


Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 device.c | 3 +++
 1 file changed, 3 insertions(+)

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);
 	}
 }
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list