From 55b8d754c65c0568b68f6ab7398d4378a96b5aa1 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 5 Jul 2012 13:57:25 +0200 Subject: [PATCH] vlan.c: prevent segfault in get_vlan_device_chain() if the base device does not exist --- vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.25.1