librpc: Simplify dcesrv_check_or_create_context()
authorVolker Lendecke <vl@samba.org>
Wed, 27 Jan 2021 08:49:33 +0000 (09:49 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 28 Jan 2021 16:58:35 +0000 (16:58 +0000)
Use ndr_syntax_id_buf_string(), avoid a talloc/talloc_free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
librpc/rpc/dcesrv_core.c

index ccfc01a57d9c997fba2f4565c5441a4153789834..0ef85e10df32b87b1cc920e86f735444f5cb4cf0 100644 (file)
@@ -1362,9 +1362,10 @@ static NTSTATUS dcesrv_check_or_create_context(struct dcesrv_call_state *call,
 
        iface = find_interface_by_uuid(call->conn->endpoint, &uuid, if_version);
        if (iface == NULL) {
-               char *uuid_str = GUID_string(call, &uuid);
-               DEBUG(2,("Request for unknown dcerpc interface %s/%d\n", uuid_str, if_version));
-               talloc_free(uuid_str);
+               struct ndr_syntax_id_buf buf;
+               DBG_NOTICE("Request for unknown dcerpc interface %s\n",
+                          ndr_syntax_id_buf_string(
+                                  &ctx->abstract_syntax, &buf));
                /*
                 * We report this only via ack->result
                 */