From d2b2d89770ae1c9175564cf165e0cf2ea1898399 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 23 Nov 2018 08:53:45 +0100 Subject: [PATCH] winbind: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/winbindd/winbindd_getusersids.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source3/winbindd/winbindd_getusersids.c b/source3/winbindd/winbindd_getusersids.c index 024bad2b9e5..9a6a24107b9 100644 --- a/source3/winbindd/winbindd_getusersids.c +++ b/source3/winbindd/winbindd_getusersids.c @@ -104,13 +104,11 @@ NTSTATUS winbindd_getusersids_recv(struct tevent_req *req, } for (i=0; inum_sids; i++) { - char *str = sid_string_tos(&state->sids[i]); - if (str == NULL) { - TALLOC_FREE(result); - return NT_STATUS_NO_MEMORY; - } - result = talloc_asprintf_append_buffer(result, "%s\n", str); - TALLOC_FREE(str); + struct dom_sid_buf sidbuf; + result = talloc_asprintf_append_buffer( + result, + "%s\n", + dom_sid_str_buf(&state->sids[i], &sidbuf)); if (result == NULL) { return NT_STATUS_NO_MEMORY; } -- 2.34.1