summaryrefslogtreecommitdiff
path: root/pfinet/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'pfinet/misc.c')
-rw-r--r--pfinet/misc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pfinet/misc.c b/pfinet/misc.c
index 1bae1e92..74772a68 100644
--- a/pfinet/misc.c
+++ b/pfinet/misc.c
@@ -27,9 +27,11 @@ make_sock_user (struct socket *sock, int isroot)
{
struct sock_user *user;
- user = ports_allocate_port (pfinet_bucket,
- sizeof (struct sock_user),
- socketport_class);
+ errno = ports_create_port (pfinet_bucket,
+ sizeof (struct sock_user),
+ socketport_class, &user);
+ if (errno)
+ return 0;
user->isroot = isroot;
user->sock = sock;