diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/cbuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/lib/cbuf.c b/source3/lib/cbuf.c index e9763ae403..16dd52c292 100644 --- a/source3/lib/cbuf.c +++ b/source3/lib/cbuf.c @@ -116,8 +116,10 @@ cbuf* cbuf_takeover(cbuf* b1, cbuf* b2) cbuf* cbuf_swapptr(cbuf* b, char** ptr, size_t len) { + void* p = talloc_parent(*ptr); SWAP(b->buf, *ptr, char*); talloc_steal(b, b->buf); + talloc_steal(p, *ptr); b->size = talloc_get_size(b->buf); b->pos = (len == -1) ? strlen(b->buf) : len; |