mirror of
git://github.com/lxc/lxc
synced 2025-08-31 15:19:26 +00:00
coverity: fix use before null check
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user