Require passing in an event context to endpoint mapper utility function.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 16 Apr 2008 23:09:33 +0000 (01:09 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 16 Apr 2008 23:09:33 +0000 (01:09 +0200)
source/librpc/rpc/dcerpc_util.c

index 6f1ee03313f029b47da8b28cf4db5217161a31cb..71c6d5f2cc85d08e79ca65f972b47d1720d0876a 100644 (file)
@@ -209,32 +209,20 @@ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
        struct epm_map_binding_state *s;
        struct composite_context *pipe_connect_req;
        struct cli_credentials *anon_creds;
-       struct event_context *new_ev = NULL;
 
        NTSTATUS status;
        struct dcerpc_binding *epmapper_binding;
        int i;
 
-       /* Try to find event context in memory context in case passed
-        * event_context (argument) was NULL. If there's none, just
-        * create a new one.
-        */
        if (ev == NULL) {
-               ev = event_context_find(mem_ctx);
-               if (ev == NULL) {
-                       new_ev = event_context_init(mem_ctx);
-                       if (new_ev == NULL) return NULL;
-                       ev = new_ev;
-               }
+               return NULL;
        }
 
        /* composite context allocation and setup */
        c = composite_create(mem_ctx, ev);
        if (c == NULL) {
-               talloc_free(new_ev);
                return NULL;
        }
-       talloc_steal(c, new_ev);
 
        s = talloc_zero(c, struct epm_map_binding_state);
        if (composite_nomem(s, c)) return c;