s4-schannel: fixed reference to context after free
authorAndrew Tridgell <tridge@samba.org>
Sun, 12 Sep 2010 21:44:06 +0000 (07:44 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 15 Sep 2010 05:39:34 +0000 (15:39 +1000)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/librpc/rpc/dcerpc_schannel.c

index b8839f9c77a9ccbad8ab9527980a221fa6560a5a..ff511a2c67682454de82ae8006cd8cb91aaf0620 100644 (file)
@@ -317,11 +317,12 @@ static void continue_schannel_key(struct composite_context *ctx)
                                                      struct composite_context);
        struct auth_schannel_state *s = talloc_get_type(c->private_data,
                                                        struct auth_schannel_state);
+       NTSTATUS status;
 
        /* receive schannel key */
-       c->status = dcerpc_schannel_key_recv(ctx);
+       status = c->status = dcerpc_schannel_key_recv(ctx);
        if (!composite_is_ok(c)) {
-               DEBUG(1, ("Failed to setup credentials: %s\n", nt_errstr(c->status)));
+               DEBUG(1, ("Failed to setup credentials: %s\n", nt_errstr(status)));
                return;
        }