diff options
author | Volker Lendecke <vl@samba.org> | 2020-12-31 10:11:04 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2021-01-11 14:25:04 +0000 |
commit | 08da3439eddf26bdeece1a4e3c729e4dfcbd5d5e (patch) | |
tree | 02726a7d245b0dd7a2361fd47df5819867468e8d /librpc | |
parent | 912196f430bff381bc0565966d95f5f46ec570c9 (diff) | |
download | samba-08da3439eddf26bdeece1a4e3c729e4dfcbd5d5e.tar.gz |
librpc: Use GUID_buf_string in dcerpc_binding_string()
Avoid a (small) memleak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan 11 14:25:04 UTC 2021 on sn-devel-184
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/rpc/binding.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c index 75246dfd538..0a78be5bf16 100644 --- a/librpc/rpc/binding.c +++ b/librpc/rpc/binding.c @@ -227,9 +227,11 @@ _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_bi } if (!GUID_all_zero(&b->object)) { + struct GUID_txt_buf buf; + o = s; - s = talloc_asprintf_append_buffer(s, "%s@", - GUID_string(mem_ctx, &b->object)); + s = talloc_asprintf_append_buffer( + s, "%s@", GUID_buf_string(&b->object, &buf)); if (s == NULL) { talloc_free(o); return NULL; |