summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-22 23:20:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:12 -0500
commit1cb21b84a93028147ebd9c408a9db42d34e6cbf0 (patch)
tree6b8908471077e5d3f31d607aa633813e8dda4730 /source4/librpc/rpc
parent4c4738938a6681c8691f2c17cbdb23c707272251 (diff)
downloadsamba-1cb21b84a93028147ebd9c408a9db42d34e6cbf0.tar.gz
samba-1cb21b84a93028147ebd9c408a9db42d34e6cbf0.tar.bz2
samba-1cb21b84a93028147ebd9c408a9db42d34e6cbf0.zip
r5980: Fix double free after unexpected disconnect.
(This used to be commit 6149bd3702a0293fc1f798de7c399e3e6858416d)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index 6222fd6bc9..a7ceb38750 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -275,7 +275,11 @@ static struct event_context *sock_event_context(struct dcerpc_connection *p)
*/
static NTSTATUS sock_shutdown_pipe(struct dcerpc_connection *p)
{
- sock_dead(p, NT_STATUS_OK);
+ struct sock_private *sock = p->transport.private;
+
+ if (sock && sock->sock) {
+ sock_dead(p, NT_STATUS_OK);
+ }
return NT_STATUS_OK;
}