git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bf9b64
)
Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().
author
Jeremy Allison
<jra@samba.org>
Tue, 27 Aug 2013 19:43:50 +0000
(12:43 -0700)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 10 Mar 2015 09:55:36 +0000
(10:55 +0100)
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
)
lib/talloc/talloc.c
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.c
b/lib/talloc/talloc.c
index 067d46f97d3100c2bc3fe53fc4f624166d2650c7..7b827ca0c15cb3ddb685a6bd3fab8eb54dd844d1 100644
(file)
--- 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;
}
}