From: Jo-Philipp Wich Date: Thu, 5 Jul 2012 11:57:25 +0000 (+0200) Subject: vlan.c: prevent segfault in get_vlan_device_chain() if the base device does not exist X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=55b8d754c65c0568b68f6ab7398d4378a96b5aa1;hp=4b284038e226b4deace501eae66c67737c7f324c vlan.c: prevent segfault in get_vlan_device_chain() if the base device does not exist --- diff --git a/vlan.c b/vlan.c index 9a6e2b6..785cc9e 100644 --- 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 {