From: Volker Lendecke Date: Sun, 28 Apr 2024 14:29:23 +0000 (+0200) Subject: pylibsmb: Avoid talloc() X-Git-Tag: tdb-1.4.11~886 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30b7cf9b3c0c0968166811313aa48b1eedcad67a;p=thirdparty%2Fsamba.git pylibsmb: Avoid talloc() dom_sid_string() does an implicit talloc_strdup() which is not necessary here. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index fca02ea082d..767187913f6 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -1886,6 +1886,7 @@ static NTSTATUS list_posix_helper(struct file_info *finfo, { PyObject *result = (PyObject *)state; PyObject *file = NULL; + struct dom_sid_buf owner_buf, group_buf; int ret; /* @@ -1923,9 +1924,9 @@ static NTSTATUS list_posix_helper(struct file_info *finfo, "reparse_tag", finfo->reparse_tag, "owner_sid", - dom_sid_string(finfo, &finfo->owner_sid), + dom_sid_str_buf(&finfo->owner_sid, &owner_buf), "group_sid", - dom_sid_string(finfo, &finfo->group_sid), + dom_sid_str_buf(&finfo->group_sid, &group_buf), "reparse_tag", (unsigned long)finfo->reparse_tag); if (file == NULL) {