diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index f4dc4afd57f..68a2a2c9234 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -406,9 +406,9 @@ static NTSTATUS create_lsa_policy_handle(TALLOC_CTX *mem_ctx, info->name = talloc_strdup(info, name); - if (sd) { - info->sd = dup_sec_desc(info, sd); - if (!info->sd) { + if (sd != NULL) { + info->sd = security_descriptor_copy(info, sd); + if (info->sd == NULL) { talloc_free(info); return NT_STATUS_NO_MEMORY; }