]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Replace a few calls to TALLOC() with talloc_size()
authorVolker Lendecke <vl@samba.org>
Fri, 17 Oct 2025 12:26:00 +0000 (14:26 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 10 Nov 2025 13:29:30 +0000 (13:29 +0000)
That does the same

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/lib/util.c
source3/smbd/smb1_nttrans.c

index 8f6b8634b21a0dfc2c8a9e42477cbf84168fbebc..9798cacca86219d5fe74a21791366a9c9f4f3168 100644 (file)
@@ -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;
                }
index e0722d00450dadf2d9ef4a8d0c9a60046434de31..ad5bc5b7d94aca6f4e9e1227110b8e31361e71f3 100644 (file)
@@ -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);