diff options
author | Volker Lendecke <vl@samba.org> | 2021-01-22 19:56:20 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2021-01-28 16:58:35 +0000 |
commit | 243ce602129232e50313099f094cf09a848a2ab0 (patch) | |
tree | c67871cc6ff7ccf570f2621f13d8f041680e6766 /librpc | |
parent | a35c8a0ec233175fd677a40ad72ac707a5c45915 (diff) | |
download | samba-243ce602129232e50313099f094cf09a848a2ab0.tar.gz |
librpc: Use ndr_syntax_id_buf_string() in dcerpc_sec_vt_pctx_check()
"mem_ctx" is no longer needed
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/rpc/dcerpc_util.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/librpc/rpc/dcerpc_util.c b/librpc/rpc/dcerpc_util.c index 42e8e611019..24bd6870fdd 100644 --- a/librpc/rpc/dcerpc_util.c +++ b/librpc/rpc/dcerpc_util.c @@ -1189,7 +1189,6 @@ static bool dcerpc_sec_vt_bitmask_check(const uint32_t *bitmask1, static bool dcerpc_sec_vt_pctx_check(const struct dcerpc_sec_vt_pcontext *pcontext, struct dcerpc_sec_vt *c) { - TALLOC_CTX *mem_ctx; bool ok; if (pcontext == NULL) { @@ -1202,34 +1201,32 @@ static bool dcerpc_sec_vt_pctx_check(const struct dcerpc_sec_vt_pcontext *pconte return true; } - mem_ctx = talloc_stackframe(); ok = ndr_syntax_id_equal(&pcontext->abstract_syntax, &c->u.pcontext.abstract_syntax); if (!ok) { + struct ndr_syntax_id_buf buf1, buf2; DEBUG(10, ("SEC_VT check pcontext abstract_syntax failed: " "%s vs. %s\n", - ndr_syntax_id_to_string(mem_ctx, - &pcontext->abstract_syntax), - ndr_syntax_id_to_string(mem_ctx, - &c->u.pcontext.abstract_syntax))); - goto err_ctx_free; + ndr_syntax_id_buf_string( + &pcontext->abstract_syntax, &buf1), + ndr_syntax_id_buf_string( + &c->u.pcontext.abstract_syntax, &buf2))); + return false; } ok = ndr_syntax_id_equal(&pcontext->transfer_syntax, &c->u.pcontext.transfer_syntax); if (!ok) { + struct ndr_syntax_id_buf buf1, buf2; DEBUG(10, ("SEC_VT check pcontext transfer_syntax failed: " "%s vs. %s\n", - ndr_syntax_id_to_string(mem_ctx, - &pcontext->transfer_syntax), - ndr_syntax_id_to_string(mem_ctx, - &c->u.pcontext.transfer_syntax))); - goto err_ctx_free; + ndr_syntax_id_buf_string( + &pcontext->transfer_syntax, &buf1), + ndr_syntax_id_buf_string( + &c->u.pcontext.transfer_syntax, &buf2))); + return false; } - ok = true; -err_ctx_free: - talloc_free(mem_ctx); - return ok; + return true; } static bool dcerpc_sec_vt_hdr2_check(const struct dcerpc_sec_vt_header2 *header2, |