diff options
author | Jeremy Allison <jra@samba.org> | 2013-08-27 13:03:27 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-03-15 22:14:07 +0100 |
commit | e9f3ce8e93e8f75bf701789665d044f267ddf1a1 (patch) | |
tree | 251dccd63c4e7396fc26ac63e762d9b1ece47985 | |
parent | 2435334409d441e502535aa4b353cd7ef9174cf2 (diff) | |
download | samba-e9f3ce8e93e8f75bf701789665d044f267ddf1a1.tar.gz |
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>
(cherry picked from commit 314508dd73105138d756f4ca3dfb65f1d368a9f7)
-rw-r--r-- | lib/talloc/talloc.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 2683ff074e9..aabd2fb7627 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; |