s4:libcli: avoid talloc_reference() in finddcs_nbt_send()
[sfrench/samba-autobuild/.git] / source4 / libcli / finddcs_nbt.c
index 6a5d1fd8563e1e14faf69aefff9451c83b668cc8..147efde61c804bd0b00d4fe25cea40b08174da6d 100644 (file)
@@ -95,7 +95,7 @@ struct tevent_req *finddcs_nbt_send(TALLOC_CTX *mem_ctx,
        }
 
        if (domain_sid) {
-               state->domain_sid = talloc_reference(state, domain_sid);
+               state->domain_sid = dom_sid_dup(state, domain_sid);
                if (tevent_req_nomem(state->domain_sid, req)) {
                        return tevent_req_post(req, event_ctx);
                }