summaryrefslogtreecommitdiff
path: root/term
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-01 11:54:04 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-01 11:54:06 +0100
commitc851c4a857aec23e21ca8769b92e862e6471c852 (patch)
treedbe4cd497e1dfc18a6a91aee40abb27d105f9b2b /term
parent17df34e290602b37a17fdf3644b2e1faecb6cc4e (diff)
term: Drop spurious deref
That was a remnant of manual port lookup.
Diffstat (limited to 'term')
-rw-r--r--term/users.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/term/users.c b/term/users.c
index 59f02b66..b7429a4f 100644
--- a/term/users.c
+++ b/term/users.c
@@ -2181,19 +2181,12 @@ S_term_get_peername (struct trivfs_protid *cred,
return EOPNOTSUPP;
if (!cred || (cred->pi.class != tty_class && cred->pi.class != pty_class))
- {
- if (cred)
- ports_port_deref (cred);
- return EOPNOTSUPP;
- }
+ return EOPNOTSUPP;
peer = (cred->pi.class == tty_class) ? ptyctl : termctl;
if (bottom != &ptyio_bottom || !peer->hook)
- {
- ports_port_deref (cred);
- return ENOENT;
- }
+ return ENOENT;
strcpy (name, (char *) peer->hook);