s4:librpc/rpc: initialize p->binding_handle in dcerpc_secondary_context()
authorStefan Metzmacher <metze@sernet.private>
Wed, 17 Mar 2010 13:00:45 +0000 (14:00 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 17 Mar 2010 17:26:15 +0000 (18:26 +0100)
metze

source4/librpc/rpc/dcerpc_util.c

index 768a3864a1fc03b36f82fe5dc43f899f34d4974e..8fd17bd7827cf6aad7aa9e365b1bc97d29b763b4 100644 (file)
@@ -755,6 +755,13 @@ _PUBLIC_ NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
 
        p2->binding = talloc_reference(p2, p->binding);
 
+       p2->binding_handle = talloc(p2, struct dcerpc_binding_handle);
+       if (p2->binding_handle == NULL) {
+               talloc_free(p2);
+               return NT_STATUS_NO_MEMORY;
+       }
+       p2->binding_handle->private_data = p2;
+
        status = dcerpc_alter_context(p2, p2, &p2->syntax, &p2->transfer_syntax);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(p2);