summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-12-02 12:12:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:17 -0500
commit4299e989c0e50dcc4f2940b4db50a0b67117fd4c (patch)
tree92fd1cb037a4b3a39fe5c62ef89f693e45c50878 /source4/librpc/rpc
parentb71458c742f355eebe6ed38e4394fb06ea81f210 (diff)
downloadsamba-4299e989c0e50dcc4f2940b4db50a0b67117fd4c.tar.gz
samba-4299e989c0e50dcc4f2940b4db50a0b67117fd4c.tar.bz2
samba-4299e989c0e50dcc4f2940b4db50a0b67117fd4c.zip
r4042: fix segfault on server schannel connections
metze (This used to be commit 57bd26f9c528687ca2ca9bbaa56f7f36efd2231f)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 4016f2d5d6..5d6a995cff 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -258,7 +258,10 @@ NTSTATUS dcerpc_schannel_creds(struct gensec_security *gensec_security,
{
struct dcerpc_schannel_state *dce_schan_state = gensec_security->private_data;
- *creds = dce_schan_state->creds;
+ *creds = talloc_reference(mem_ctx, dce_schan_state->creds);
+ if (!*creds) {
+ return NT_STATUS_NO_MEMORY;
+ }
return NT_STATUS_OK;
}