summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorBo Yang <boyang@novell.com>2009-04-29 09:50:41 +0800
committerBo Yang <boyang@novell.com>2009-04-29 09:50:41 +0800
commitf8cc0e88fbbb082ead023e0cb437b1e12cf35459 (patch)
tree8641a1f8679ceecd03db75bff4406ede1a28ff40 /source3/rpc_client
parent077bcc11257697b243916fbb02cd72b3a122b9ba (diff)
downloadsamba-f8cc0e88fbbb082ead023e0cb437b1e12cf35459.tar.gz
samba-f8cc0e88fbbb082ead023e0cb437b1e12cf35459.tar.bz2
samba-f8cc0e88fbbb082ead023e0cb437b1e12cf35459.zip
s3: fix crash in winbindd
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/rpc_transport_np.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c
index 40d68dd2ea..dceacf6815 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -31,6 +31,12 @@ struct rpc_transport_np_state {
static int rpc_transport_np_state_destructor(struct rpc_transport_np_state *s)
{
bool ret;
+
+ if (s->cli->fd == -1) {
+ DEBUG(10, ("socket was closed, no need to send close request.\n"));
+ return 0;
+ }
+
ret = cli_close(s->cli, s->fnum);
if (!ret) {
DEBUG(1, ("rpc_transport_np_state_destructor: cli_close "