diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/rpc/dcerpc_schannel.c | 5 |
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; } |