aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-03-16 15:44:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-03-16 15:44:38 +0000
commit455663ba5ecdedd6d338272bdc93ff9670bcb702 (patch)
tree037b6ca61eeab73d4fe5ba5a9a04a5696dc6116e /lib
parentefb5d9a4032f92b78b04f68fce30e12e29baeb2e (diff)
corrected the close to sclose() so that the memdebug stuff works
Diffstat (limited to 'lib')
-rw-r--r--lib/if2ip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 0acc3d6c8..01076c9a0 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -95,6 +95,7 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
strcpy(req.ifr_name, interface);
req.ifr_addr.sa_family = AF_INET;
if (SYS_ERROR == ioctl(dummy, SIOCGIFADDR, &req, sizeof(req))) {
+ sclose(dummy);
return NULL;
}
else {
@@ -109,7 +110,7 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
ip[buf_size - 1] = 0;
#endif
}
- close(dummy);
+ sclose(dummy);
}
return ip;
}