diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/talloc/talloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c index 1081302d09..6af08a2ac9 100644 --- a/source4/lib/talloc/talloc.c +++ b/source4/lib/talloc/talloc.c @@ -111,8 +111,7 @@ struct talloc_chunk { static struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr) { const char *pp = ptr; - pp -= TC_HDR_SIZE; - struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp); + struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE); if ((tc->flags & ~0xF) != TALLOC_MAGIC) { TALLOC_ABORT("Bad talloc magic value - unknown value"); } |