From 4299e989c0e50dcc4f2940b4db50a0b67117fd4c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 2 Dec 2004 12:12:26 +0000 Subject: r4042: fix segfault on server schannel connections metze (This used to be commit 57bd26f9c528687ca2ca9bbaa56f7f36efd2231f) --- source4/librpc/rpc/dcerpc_schannel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit