diff options
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index d0c81d3d43..011e8f3343 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -935,12 +935,16 @@ static inline int _talloc_free_internal(void *ptr, const char *location) TC_INVALIDATE_FULL_CHUNK(tc); free(tc); } - } else if (tc->flags & TALLOC_FLAG_POOLMEM) { + return 0; + } + + if (tc->flags & TALLOC_FLAG_POOLMEM) { _talloc_free_poolmem(tc, location); - } else { - TC_INVALIDATE_FULL_CHUNK(tc); - free(tc); + return 0; } + + TC_INVALIDATE_FULL_CHUNK(tc); + free(tc); return 0; } |