corrected the close to sclose() so that the memdebug stuff works

This commit is contained in:
Daniel Stenberg 2001-03-16 15:44:38 +00:00
parent efb5d9a403
commit 455663ba5e
1 changed files with 2 additions and 1 deletions

View File

@ -95,6 +95,7 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
strcpy(req.ifr_name, interface); strcpy(req.ifr_name, interface);
req.ifr_addr.sa_family = AF_INET; req.ifr_addr.sa_family = AF_INET;
if (SYS_ERROR == ioctl(dummy, SIOCGIFADDR, &req, sizeof(req))) { if (SYS_ERROR == ioctl(dummy, SIOCGIFADDR, &req, sizeof(req))) {
sclose(dummy);
return NULL; return NULL;
} }
else { else {
@ -109,7 +110,7 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
ip[buf_size - 1] = 0; ip[buf_size - 1] = 0;
#endif #endif
} }
close(dummy); sclose(dummy);
} }
return ip; return ip;
} }