Commit 32571606 by Serge Hallyn

coverity: fix use before null check

parent ce42ba2c
......@@ -140,10 +140,11 @@ int lxc_netdev_move_by_name(char *ifname, pid_t pid)
{
int index;
index = if_nametoindex(ifname);
if (!ifname)
return -EINVAL;
index = if_nametoindex(ifname);
return lxc_netdev_move_by_index(index, pid);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment