Merge pull request #3046 from brauner/lxc/master

network: fix lxc_netdev_rename_by_index()
This commit is contained in:
Stéphane Graber 2019-06-14 07:48:31 -04:00 committed by GitHub
commit bd6c1ff60b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1160,8 +1160,10 @@ int lxc_netdev_rename_by_index(int ifindex, const char *newname)
return err;
len = strlen(newname);
if (len == 1 || len >= IFNAMSIZ)
if (len == 1 || len >= IFNAMSIZ) {
err = -EINVAL;
goto out;
}
err = -ENOMEM;
nlmsg = nlmsg_alloc(NLMSG_GOOD_SIZE);