diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-04-23 15:12:35 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-23 15:12:35 +0200 |
commit | 53d491c9a4011a7d9ad69db52fb91d163f3f990a (patch) | |
tree | 9d0ed3130f35142da50c2e20e8addfe8909f459f /lib/talloc | |
parent | af6298a84dffb400551861c6dc34591f1473830c (diff) | |
parent | 1722859abd169f2949b5822f97c810f2b8d162da (diff) | |
download | samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.tar.gz samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.tar.bz2 samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into abartlet-devel
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 60a48ad811..33cbfd7d26 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -1008,6 +1008,11 @@ void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *n return NULL; } + /* don't let anybody try to realloc a talloc_pool */ + if (unlikely(tc->flags & TALLOC_FLAG_POOL)) { + return NULL; + } + /* don't shrink if we have less than 1k to gain */ if ((size < tc->size) && ((tc->size - size) < 1024)) { tc->size = size; |