summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-27 13:03:27 -0700
committerJeremy Allison <jra@samba.org>2013-08-27 15:44:20 -0700
commit314508dd73105138d756f4ca3dfb65f1d368a9f7 (patch)
treefde5a17acee1b69f69f20b9c10d470e4a88ee122
parent0fbcfcc824e474874c15d7c0b2ea0df408448906 (diff)
downloadsamba-314508dd73105138d756f4ca3dfb65f1d368a9f7.tar.gz
samba-314508dd73105138d756f4ca3dfb65f1d368a9f7.tar.bz2
samba-314508dd73105138d756f4ca3dfb65f1d368a9f7.zip
Don't call talloc_memlimit_update() inside _talloc_realloc() when we're just manipulating pool members.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
-rw-r--r--lib/talloc/talloc.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 2683ff074e..aabd2fb762 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -1629,14 +1629,6 @@ _PUBLIC_ void *_talloc_realloc(const void *context, void *ptr, size_t size, cons
if (new_chunk_size == old_chunk_size) {
TC_UNDEFINE_GROW_CHUNK(tc, size);
tc->flags &= ~TALLOC_FLAG_FREE;
- if (!talloc_memlimit_update(tc->limit,
- tc->size, size)) {
- talloc_abort("cur_size memlimit counter not"
- " correct!");
- errno = EINVAL;
- return NULL;
- }
-
tc->size = size;
return ptr;
}
@@ -1652,13 +1644,6 @@ _PUBLIC_ void *_talloc_realloc(const void *context, void *ptr, size_t size, cons
if (space_left >= space_needed) {
TC_UNDEFINE_GROW_CHUNK(tc, size);
tc->flags &= ~TALLOC_FLAG_FREE;
- if (!talloc_memlimit_update(tc->limit,
- tc->size, size)) {
- talloc_abort("cur_size memlimit "
- "counter not correct!");
- errno = EINVAL;
- return NULL;
- }
tc->size = size;
pool_tc->hdr.c.pool = tc_next_chunk(tc);
return ptr;