summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-27 12:43:50 -0700
committerKarolin Seeger <kseeger@samba.org>2015-03-15 22:14:07 +0100
commitddde41cd74cf37cddd27b4a83f154134a291aa1a (patch)
treea40e67ba69c5ef512106b3ee5bc838c76aa6009d
parent079a5e628b535d4cb94e71a1899021986f3b657d (diff)
downloadsamba-ddde41cd74cf37cddd27b4a83f154134a291aa1a.tar.gz
Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().
Callers already account for TC_HDR_SIZE, do not add it twice. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> (cherry picked from commit 7a6beae68ee3f9a97e9e56f4e24a437839fb3e19)
-rw-r--r--lib/talloc/talloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 067d46f97d3..7b827ca0c15 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -2561,7 +2561,7 @@ static bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size)
for (l = limit; l != NULL; l = l->upper) {
if (l->max_size != 0 &&
((l->max_size <= l->cur_size) ||
- (l->max_size - l->cur_size < TC_HDR_SIZE+size))) {
+ (l->max_size - l->cur_size < size))) {
return false;
}
}