summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 6355dd0..e4433be 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -297,8 +297,14 @@ int
soabort(so)
struct socket *so;
{
+ int error;
- return (*so->so_proto->pr_usrreqs->pru_abort)(so);
+ error = (*so->so_proto->pr_usrreqs->pru_abort)(so);
+ if (error) {
+ sofree(so);
+ return error;
+ }
+ return (0);
}
int
OpenPOWER on IntegriCloud