summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-06-17 15:35:07 -0700
committerSimo Sorce <idra@samba.org>2010-06-18 07:41:47 -0400
commitf4e7d9d38ebf209be6c040f4ef98dd8111735187 (patch)
tree95dcdb61ae1b4276400d577e81e95f9aa983f3ee /source3/include
parent3fa38046cb76d38a6be8e29111a4be225b8bdf96 (diff)
downloadsamba-f4e7d9d38ebf209be6c040f4ef98dd8111735187.tar.gz
samba-f4e7d9d38ebf209be6c040f4ef98dd8111735187.tar.bz2
samba-f4e7d9d38ebf209be6c040f4ef98dd8111735187.zip
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 <idra@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/ntdomain.h4
1 files changed, 3 insertions, 1 deletions
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;