From 3b5da8d609d1ba2991bc88c59aff2c664deec523 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Fri, 8 Jun 2012 08:04:51 +0000 Subject: Plug socket refcount leak on error in sys_sctp_peeloff. Reviewed by: tuexen Approved by: trasz (mentor) MFC after: 3 days --- sys/kern/uipc_syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index a0794b989878..719d298cc568 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -2327,11 +2327,11 @@ sys_sctp_peeloff(td, uap) goto done2; if (head->so_proto->pr_protocol != IPPROTO_SCTP) { error = EOPNOTSUPP; - goto done2; + goto done; } error = sctp_can_peel_off(head, (sctp_assoc_t)uap->name); if (error) - goto done2; + goto done; /* * At this point we know we do have a assoc to pull * we proceed to get the fd setup. This may block -- cgit v1.2.3