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>
Wed, 15 Jul 2009 10:08:18 +0000 (12:08 +0200)
metze

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

index 81578a1a8859ba007623e65d3f972ba087461e3e..77b1543f564c48baa72598140cdecccf499fe509 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 66e12d0da1464b7cef1f1a67ab42459f163f3f39..c1fa8a034884fa7bd40901d9302c0b86f57f733d 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;
                }