s3-dcerpc: Break memory hierarchy for shared structure
authorSimo Sorce <idra@samba.org>
Wed, 14 Jul 2010 12:57:47 +0000 (08:57 -0400)
committerAndreas Schneider <asn@samba.org>
Wed, 14 Jul 2010 13:03:02 +0000 (15:03 +0200)
Handles are shared among multiple pipes_struct. We cannot allocate
them on any specific pipes_struct or it will vanish for all others
as soon as that pipes_struct is freed, leaving back dangling
pointers.

Signed-off-by: Andreas Schneider <asn@samba.org>
source3/rpc_server/rpc_handles.c

index bfdc7a85611332b0eaf26aa1a6714395ecd47b2a..e073fe45a283f299a0b62d19bcc6b3e3ab1bacf2 100644 (file)
@@ -103,7 +103,7 @@ bool init_pipe_handles(pipes_struct *p, const struct ndr_syntax_id *syntax)
                /*
                 * First open, we have to create the handle list
                 */
-               hl = talloc_zero(p, struct handle_list);
+               hl = talloc_zero(NULL, struct handle_list);
                if (hl == NULL) {
                        return false;
                }