From: Volker Lendecke Date: Fri, 23 Nov 2018 07:53:45 +0000 (+0100) Subject: winbind: Use dom_sid_str_buf X-Git-Tag: tdb-1.3.17~616 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2b2d89770ae1c9175564cf165e0cf2ea1898399;p=thirdparty%2Fsamba.git winbind: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- 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; }