summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 54f3c0a56d..2683ff074e 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -1507,7 +1507,7 @@ _PUBLIC_ void *_talloc_realloc(const void *context, void *ptr, size_t size, cons
return NULL;
}
- if (tc->limit && (size - tc->size > 0)) {
+ if (tc->limit && (size > tc->size)) {
if (!talloc_memlimit_check(tc->limit, (size - tc->size))) {
errno = ENOMEM;
return NULL;