summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2021-01-22 19:33:51 +0100
committerVolker Lendecke <vl@samba.org>2021-01-28 16:58:35 +0000
commit9374313f0333a1501d6fb823dbed86fb136f0766 (patch)
treed6e913c7341facc302253bc8d705e363369f4271 /librpc
parentc8c2aef0ac613849d641e39193448f3e512caccf (diff)
downloadsamba-9374313f0333a1501d6fb823dbed86fb136f0766.tar.gz
libndr: Simplify ndr_print_GUID()
Fix a small memleak of the tmp GUID_string Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/ndr_misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/librpc/ndr/ndr_misc.c b/librpc/ndr/ndr_misc.c
index 155ab8f21b8..0cbaa0b2a2f 100644
--- a/librpc/ndr/ndr_misc.c
+++ b/librpc/ndr/ndr_misc.c
@@ -28,7 +28,8 @@
_PUBLIC_ void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid)
{
- ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid));
+ struct GUID_txt_buf buf;
+ ndr->print(ndr, "%-25s: %s", name, GUID_buf_string(guid, &buf));
}
bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1,