r2673: in the rpc server, free up the old call when we decide to extend an
authorAndrew Tridgell <tridge@samba.org>
Mon, 27 Sep 2004 04:11:37 +0000 (04:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:20 +0000 (12:59 -0500)
existing call rather than creating a new one. This prevents call
structures hanging around on the rpc connection context until it is
closed

source/rpc_server/dcerpc_server.c

index 5ab434baed4374c46b7915b06d8fc8c08a0b152a..9536fd68946364bde62b33b1bec6e1de607f6682 100644 (file)
@@ -250,7 +250,7 @@ static NTSTATUS dcesrv_inherited_session_key(struct dcesrv_connection *p,
 }
 
 NTSTATUS dcesrv_generic_session_key(struct dcesrv_connection *p,
-                                 DATA_BLOB *session_key)
+                                   DATA_BLOB *session_key)
 {
        /* this took quite a few CPU cycles to find ... */
        session_key->data = "SystemLibraryDTC";
@@ -831,6 +831,8 @@ NTSTATUS dcesrv_input_process(struct dcesrv_connection *dce_conn)
                        call2->pkt.u.request.stub_and_verifier.length;
 
                call->pkt.pfc_flags |= (call2->pkt.pfc_flags & DCERPC_PFC_FLAG_LAST);
+
+               talloc_free(call2);
        }
 
        /* this may not be the last pdu in the chain - if its isn't then