summaryrefslogtreecommitdiff
path: root/checksum.c
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2020-06-25 19:59:19 -0700
committerWayne Davison <wayne@opencoder.net>2020-06-25 20:54:21 -0700
commit11eb67eec9b4d990ae4df680cf7db77dad1b8630 (patch)
tree977f60274b7784ad12854bbe575503bae46c3e6c /checksum.c
parent39a083b16b6d229f32078569ea8bd2c4bb29a44b (diff)
downloadrsync-11eb67eec9b4d990ae4df680cf7db77dad1b8630.tar.gz
Some memory allocation improvements
- All the memory-allocation macros now auto-check for failure and exit with a failure message that incudes the caller's file and lineno info. This includes strdup(). - Added the `--max-alloc=SIZE` option to be able to override the memory allocator's sanity-check limit. It defaults to 1G (as before). Fixes bugzilla bug 12769.
Diffstat (limited to 'checksum.c')
-rw-r--r--checksum.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/checksum.c b/checksum.c
index 824159b0..b3989aa2 100644
--- a/checksum.c
+++ b/checksum.c
@@ -271,8 +271,6 @@ void get_checksum2(char *buf, int32 len, char *sum)
free(buf1);
buf1 = new_array(char, len+4);
len1 = len;
- if (!buf1)
- out_of_memory("get_checksum2");
}
memcpy(buf1, buf, len);