]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: fix returns in set_config_net_veth_vlan_tagged_id() 3738/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 26 Mar 2021 22:02:59 +0000 (23:02 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 26 Mar 2021 22:02:59 +0000 (23:02 +0100)
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32494
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 73ffce7ebce50adbbc0b2af5785b30589177a1a3..9f30887562f4540e341fe274adcab017f8662e94 100644 (file)
@@ -525,6 +525,7 @@ static int set_config_net_veth_vlan_id(const char *key, const char *value,
                netdev->priv.veth_attr.vlan_id = BRIDGE_VLAN_NONE;
        } else {
                unsigned short vlan_id;
+
                ret = get_u16(&vlan_id, value, 0);
                if (ret < 0)
                        return ret_errno(EINVAL);
@@ -555,10 +556,10 @@ static int set_config_net_veth_vlan_tagged_id(const char *key, const char *value
 
        ret = get_u16(&vlan_id, value, 0);
        if (ret < 0)
-               ret_errno(EINVAL);
+               return ret_errno(EINVAL);
 
        if (vlan_id > BRIDGE_VLAN_ID_MAX)
-               ret_errno(EINVAL);
+               return ret_errno(EINVAL);
 
        list = lxc_list_new();
        if (!list)