From f4e7d9d38ebf209be6c040f4ef98dd8111735187 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 17 Jun 2010 15:35:07 -0700 Subject: Convert the prs_XXX struct and functions to use talloc instead of malloc. Passes valgrind and make tests for client and server. Second version of this patch after splitting up at Simo's request. Patch to follow will delete extraneous prs_mem_free() calls. Jeremy. Signed-off-by: Simo Sorce --- source3/include/ntdomain.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/include/ntdomain.h') diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 213cb9ff75..25bef47493 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -42,7 +42,9 @@ typedef struct _prs_struct { uint32 data_offset; /* Current working offset into data. */ uint32 buffer_size; /* Current allocated size of the buffer. */ uint32 grow_size; /* size requested via prs_grow() calls */ - char *data_p; /* The buffer itself. */ + /* The buffer itself. If "is_dynamic" is true this + * MUST BE TALLOC'ed off mem_ctx. */ + char *data_p; TALLOC_CTX *mem_ctx; /* When unmarshalling, use this.... */ } prs_struct; -- cgit