mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 06:45:10 +00:00
close sock when we are done with it
This commit is contained in:
@@ -139,6 +139,7 @@ void load_interfaces()
|
|||||||
if (ioctl(sock, SIOCGIFCONF, (caddr_t) ifconf) < 0) {
|
if (ioctl(sock, SIOCGIFCONF, (caddr_t) ifconf) < 0) {
|
||||||
#endif /* _ISC */
|
#endif /* _ISC */
|
||||||
(void) free(ifconf_buf);
|
(void) free(ifconf_buf);
|
||||||
|
(void) close(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,6 +254,7 @@ void load_interfaces()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
(void) free(ifconf_buf);
|
(void) free(ifconf_buf);
|
||||||
|
(void) close(sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !SIOCGIFCONF || STUB_LOAD_INTERFACES */
|
#else /* !SIOCGIFCONF || STUB_LOAD_INTERFACES */
|
||||||
|
Reference in New Issue
Block a user