diff options
-rw-r--r-- | source3/lib/talloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 98cba8597e..2df4588f42 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -158,7 +158,7 @@ static struct talloc_chunk *talloc_parent_chunk(const void *ptr) void *talloc_parent(const void *ptr) { struct talloc_chunk *tc = talloc_parent_chunk(ptr); - return (void *)(tc+1); + return tc ? (void *)(tc+1) : NULL; } /* |