diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-01-09 21:59:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:49:57 -0500 |
commit | 806b3fdbc12b3284ab9872a4ecae3a7ee34ea171 (patch) | |
tree | 2a6a69d8f95649542bd30f4b86fefb9d33437a3a /source4 | |
parent | 5c8447773f306e302c7182611e4fc03978c340b6 (diff) | |
download | samba-806b3fdbc12b3284ab9872a4ecae3a7ee34ea171.tar.gz samba-806b3fdbc12b3284ab9872a4ecae3a7ee34ea171.tar.bz2 samba-806b3fdbc12b3284ab9872a4ecae3a7ee34ea171.zip |
r12803: if we free the ndr structure how should we access the private pointer anymore?
thanks valgrind!
metze
(This used to be commit ab58decf8248f3923703fabdaab697f1a8d116c8)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/librpc/ndr/ndr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 26190b199e..9e307a3f38 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -272,6 +272,7 @@ char *ndr_print_function_string(TALLOC_CTX *mem_ctx, int flags, void *ptr) { struct ndr_print *ndr; + char *ret; ndr = talloc_zero(mem_ctx, struct ndr_print); if (!ndr) return NULL; @@ -280,8 +281,9 @@ char *ndr_print_function_string(TALLOC_CTX *mem_ctx, ndr->depth = 1; ndr->flags = 0; fn(ndr, name, flags, ptr); + ret = ndr->private; talloc_free(ndr); - return ndr->private; + return ret; } void ndr_set_flags(uint32_t *pflags, uint32_t new_flags) |