]> granicus.if.org Git - curl/commitdiff
corrected the close to sclose() so that the memdebug stuff works
authorDaniel Stenberg <daniel@haxx.se>
Fri, 16 Mar 2001 15:44:38 +0000 (15:44 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 16 Mar 2001 15:44:38 +0000 (15:44 +0000)
lib/if2ip.c

index 0acc3d6c8596222436103c83f4e8d573517852a2..01076c9a060efabf7d60ab3d0a7aa1c0104ed84c 100644 (file)
@@ -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;
 }