From: Stefan Metzmacher Date: Wed, 14 May 2025 09:24:36 +0000 (+0200) Subject: libcli/smb: create explicit talloc stackframe in reparse_data_buffer_marshall() X-Git-Tag: tevent-0.17.0~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=658ddb8ada99cd600665626bc08ffacda6b057bc;p=thirdparty%2Fsamba.git libcli/smb: create explicit talloc stackframe in reparse_data_buffer_marshall() This is needed in order to allow helper functions to use talloc_tos(). Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/libcli/smb/reparse.c b/libcli/smb/reparse.c index ffadf1c35af..233027d06a3 100644 --- a/libcli/smb/reparse.c +++ b/libcli/smb/reparse.c @@ -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; }