Make `--max-alloc=0` safer.
[rsync.git] / util2.c
diff --git a/util2.c b/util2.c
index a8609a5d5931d60e7907265f94868ef585df785e..3b5a8f41478c48ce10623ce9c004c51a8f6cbfc3 100644 (file)
--- a/util2.c
+++ b/util2.c
@@ -72,7 +72,7 @@ int msleep(int t)
 
 void *my_alloc(void *ptr, size_t num, size_t size, const char *file, int line)
 {
-       if (max_alloc && num >= max_alloc/size) {
+       if (num >= max_alloc/size) {
                if (!file)
                        return NULL;
                rprintf(FERROR, "[%s] exceeded --max-alloc=%s setting (file=%s, line=%d)\n",