diff options
author | Volker Lendecke <vl@samba.org> | 2019-11-29 14:00:51 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-12-02 21:23:35 +0000 |
commit | 4cd6c87a3d54e37b86c03b5d4bc0c24386fdfffb (patch) | |
tree | 8d4b3e464099464204daa853af42df4c30f359b5 /librpc | |
parent | 8d8d2bdfa4f988bf5fdc9e05f7f3d1b4b6c54d0d (diff) | |
download | samba-4cd6c87a3d54e37b86c03b5d4bc0c24386fdfffb.tar.gz |
libndr: Fix a talloc context leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/ndr/ndr_basic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index 0bce1322265..5c717e69858 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -1466,8 +1466,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_timespec(struct ndr_pull *ndr, _PUBLIC_ void ndr_print_timespec(struct ndr_print *ndr, const char *name, const struct timespec *t) { - ndr->print(ndr, "%-25s: %s.%ld", name, timestring(ndr, t->tv_sec), - (long)t->tv_nsec); + char *str = timestring(ndr, t->tv_sec); + ndr->print(ndr, "%-25s: %s.%ld", name, str, t->tv_nsec); + TALLOC_FREE(str); } _PUBLIC_ enum ndr_err_code ndr_push_timeval(struct ndr_push *ndr, |