r734: Fix crash bug
authorJelmer Vernooij <jelmer@samba.org>
Fri, 14 May 2004 13:07:20 +0000 (13:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:53:45 +0000 (12:53 -0500)
(This used to be commit 178cd902fc7069e3d613c46fc4845101a0229655)

source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c

index c63ab20b82823da3e386aa5dd51d9d29ba8e85fd..af3a6ac214d12b0b66822d73d96bcb694ba61f2a 100644 (file)
@@ -316,14 +316,19 @@ static WERROR rpc_add_key(REG_KEY *parent, const char *name, uint32 access_mask,
 static WERROR rpc_query_key(REG_KEY *k)
 {
     NTSTATUS status;
+       WERROR error;
     struct winreg_QueryInfoKey r;
     struct rpc_data *mydata = k->handle->backend_data;
-    struct rpc_key_data *mykeydata;                                                                                                       
+    struct rpc_key_data *mykeydata;
+
     r.in.handle = &mykeydata->pol;
     init_winreg_String(&r.in.class, NULL);
-                                                                                                       
+
+       error = rpc_key_put_rpc_data(k, &mykeydata);
+       if(!W_ERROR_IS_OK(error)) return error;
+       
     status = dcerpc_winreg_QueryInfoKey(mydata->pipe, k->mem_ctx, &r);
-                                                                                                       
+
     if (!NT_STATUS_IS_OK(status)) {
         printf("QueryInfoKey failed - %s\n", nt_errstr(status));
         return ntstatus_to_werror(status);