r1032: Fix RPC backend segfault
authorJelmer Vernooij <jelmer@samba.org>
Sat, 5 Jun 2004 18:45:27 +0000 (18:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:56:31 +0000 (12:56 -0500)
(This used to be commit db902bff3c5eb54d6b1035d009948ff316cffa94)

source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c

index 28e2094bedd41aa1661acc08f4326c6fd7c9b682..4e6944a1e3617213e2c0cadd452a204824d818ca 100644 (file)
@@ -88,7 +88,6 @@ static WERROR rpc_query_key(REG_KEY *k);
 
 static WERROR rpc_open_registry(REG_HANDLE *h, const char *location, const char *credentials)
 {
-       char *binding = strdup(location);
        NTSTATUS status;
        char *user, *pass;
 
@@ -98,7 +97,7 @@ static WERROR rpc_open_registry(REG_HANDLE *h, const char *location, const char
        pass = strchr(user, '%');
        *pass = '\0'; pass++;
 
-       status = dcerpc_pipe_connect((struct dcerpc_pipe **)&h->backend_data, binding
+       status = dcerpc_pipe_connect((struct dcerpc_pipe **)&h->backend_data, h->location
                     DCERPC_WINREG_UUID,
                     DCERPC_WINREG_VERSION,
                      lp_workgroup(),