From: Volker Lendecke Date: Fri, 17 Oct 2025 12:26:00 +0000 (+0200) Subject: s3: Replace a few calls to TALLOC() with talloc_size() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f818eba76ba85394a6c84d998113835c622f55c;p=thirdparty%2Fsamba.git s3: Replace a few calls to TALLOC() with talloc_size() That does the same Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/lib/util.c b/source3/lib/util.c index 8f6b8634b21..9798cacca86 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -536,7 +536,7 @@ void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size, goto error; } - *array = TALLOC(mem_ctx, element_size * (*array_size)); + *array = talloc_size(mem_ctx, element_size * (*array_size)); if (*array == NULL) { goto error; } diff --git a/source3/smbd/smb1_nttrans.c b/source3/smbd/smb1_nttrans.c index e0722d00450..ad5bc5b7d94 100644 --- a/source3/smbd/smb1_nttrans.c +++ b/source3/smbd/smb1_nttrans.c @@ -2553,7 +2553,8 @@ void reply_nttrans(struct smb_request *req) goto bad_param; } - state->setup = (uint16_t *)TALLOC(state, state->setup_count); + state->setup = (uint16_t *)talloc_size(state, + state->setup_count); if (state->setup == NULL) { DEBUG(0,("reply_nttrans : Out of memory\n")); SAFE_FREE(state->data);