s4:libnet: use talloc_strdup() instead of talloc_reference()
authorStefan Metzmacher <metze@samba.org>
Wed, 15 Jul 2009 10:06:12 +0000 (12:06 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 31 Jul 2009 12:42:03 +0000 (14:42 +0200)
metze

source4/libnet/libnet_join.c
source4/libnet/libnet_rpc.c

index d7b80abc55adf13080b078085e7b7d3c6f47d55f..6f32a6ec3708d4d0731725c84b6def718bee9b13 100644 (file)
@@ -1147,7 +1147,7 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx,
        if (r->in.netbios_name != NULL) {
                netbios_name = r->in.netbios_name;
        } else {
-               netbios_name = talloc_reference(tmp_mem, lp_netbios_name(ctx->lp_ctx));
+               netbios_name = talloc_strdup(tmp_mem, lp_netbios_name(ctx->lp_ctx));
                if (!netbios_name) {
                        r->out.error_string = NULL;
                        talloc_free(tmp_mem);
index 45244489280d979a0033d163978b94ae3f84cc77..1c3c5916d4c0126d6e516faa2f6f559922dcd955 100644 (file)
@@ -113,7 +113,7 @@ static struct composite_context* libnet_RpcConnectSrv_send(struct libnet_context
        }
 
        if (r->level == LIBNET_RPC_CONNECT_SERVER_ADDRESS) {
-               b->target_hostname = talloc_reference(b, r->in.name);
+               b->target_hostname = talloc_strdup(b, r->in.name);
                if (composite_nomem(b->target_hostname, c)) {
                        return c;
                }