]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup clr_config_net_hwaddr()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 17:55:51 +0000 (18:55 +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 6b2071cfff23300b21f7bfc54a86adda065e3cbd..3c0401991c63713b024045664e8d8e7b58c9a741 100644 (file)
@@ -5397,10 +5397,9 @@ static int clr_config_net_hwaddr(const char *key, struct lxc_conf *lxc_conf,
        struct lxc_netdev *netdev = data;
 
        if (!netdev)
-               return -1;
+               return ret_errno(EINVAL);
 
-       free(netdev->hwaddr);
-       netdev->hwaddr = NULL;
+       free_disarm(netdev->hwaddr);
 
        return 0;
 }