patch-2.1.26 linux/net/socket.c
Next file: linux/net/sysctl_net.c
Previous file: linux/net/rose/rose_dev.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Fri Feb 7 15:57:06 1997
- Orig file:
v2.1.25/linux/net/socket.c
- Orig date:
Thu Feb 6 12:42:16 1997
diff -u --recursive --new-file v2.1.25/linux/net/socket.c linux/net/socket.c
@@ -645,7 +645,7 @@
asmlinkage int sys_socketpair(int family, int type, int protocol, int usockvec[2])
{
int fd1, fd2, i;
- struct socket *sock1, *sock2;
+ struct socket *sock1=NULL, *sock2=NULL;
int err;
lock_kernel();
@@ -700,6 +700,10 @@
}
}
out:
+ if(sock1)
+ sockfd_put(sock1);
+ if(sock2)
+ sockfd_put(sock2);
unlock_kernel();
return err;
}
@@ -1114,6 +1118,7 @@
err=sock->ops->shutdown(sock, how);
sockfd_put(sock);
}
+ unlock_kernel();
return err;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov