iptuntap: avoid double open

would leak a file handle
This commit is contained in:
Dan McGee 2011-08-31 12:14:51 -07:00 committed by Stephen Hemminger
parent 223f4d8ea6
commit 1313ceb4d6
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ static void usage(void)
static int tap_add_ioctl(struct ifreq *ifr, uid_t uid, gid_t gid)
{
int fd = open(TUNDEV, O_RDWR);
int fd;
int ret = -1;
#ifdef IFF_TUN_EXCL