mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-16 02:23:41 +08:00
Fix curthread so it returns a valid value.
This commit is contained in:
@@ -202,6 +202,10 @@ socket (int domain, int type, int protocol)
|
||||
int fd, error;
|
||||
|
||||
td = curthread;
|
||||
if (!td) {
|
||||
printf("Current thread NULL\n");
|
||||
exit(0);
|
||||
}
|
||||
#ifdef MAC
|
||||
error = mac_socket_check_create(td->td_ucred, domain, type, protocol);
|
||||
if (error == 0 )
|
||||
|
Reference in New Issue
Block a user