]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup clr_config_net_mtu()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 17:56:13 +0000 (18:56 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 14:01:44 +0000 (15:01 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 3c0401991c63713b024045664e8d8e7b58c9a741..9670dbfd112f5b361900d478c59b23058d616090 100644 (file)
@@ -5410,10 +5410,9 @@ static int clr_config_net_mtu(const char *key, struct lxc_conf *lxc_conf,
        struct lxc_netdev *netdev = data;
 
        if (!netdev)
-               return -1;
+               return ret_errno(EINVAL);
 
-       free(netdev->mtu);
-       netdev->mtu = NULL;
+       free_disarm(netdev->mtu);
 
        return 0;
 }