diff options
-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) |