]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/smb: create explicit talloc stackframe in reparse_data_buffer_marshall()
authorStefan Metzmacher <metze@samba.org>
Wed, 14 May 2025 09:24:36 +0000 (11:24 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 19 May 2025 09:11:29 +0000 (09:11 +0000)
This is needed in order to allow helper functions to use talloc_tos().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
libcli/smb/reparse.c

index ffadf1c35af9d42a0af50929580b14f9aaf702fa..233027d06a3544a4033833b3ce384e398babb2d4 100644 (file)
@@ -532,6 +532,7 @@ ssize_t reparse_data_buffer_marshall(const struct reparse_data_buffer *src,
                                     uint8_t *buf,
                                     size_t buflen)
 {
+       TALLOC_CTX *frame = talloc_stackframe();
        ssize_t ret = -1;
 
        switch (src->tag) {
@@ -563,6 +564,7 @@ ssize_t reparse_data_buffer_marshall(const struct reparse_data_buffer *src,
        }
        }
 
+       TALLOC_FREE(frame);
        return ret;
 }