vlan.c: prevent segfault in get_vlan_device_chain() if the base device does not exist
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 5 Jul 2012 11:57:25 +0000 (13:57 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 5 Jul 2012 11:57:25 +0000 (13:57 +0200)
vlan.c

diff --git a/vlan.c b/vlan.c
index 9a6e2b6..785cc9e 100644 (file)
--- a/vlan.c
+++ b/vlan.c
@@ -145,7 +145,7 @@ struct device *get_vlan_device_chain(const char *ifname, bool create)
 
        s = split_vlan(buf);
        dev = device_get(buf, create);
-       if (!dev && !create)
+       if (!dev)
                goto error;
 
        do {