From: Hans Dedecker Date: Tue, 4 Aug 2015 14:22:42 +0000 (+0200) Subject: netifd: Fix SEG fault when device cannot be allocated X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f14e668cf0c6ebade6a4cef0ab66f13acf8e2046;p=oweals%2Fnetifd.git netifd: Fix SEG fault when device cannot be allocated Signed-off-by: Hans Dedecker --- 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); } }