diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-06 02:18:14 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-07 22:04:49 +0800 |
commit | 9e2886aff8f330f54fb341c98dff3b61163dfc3c (patch) | |
tree | 11c7e1695ecb87ac2d36afbf9d7a927e34377b84 /source/fitz | |
parent | 5ad87e299f4e3affcca12a0173429861d01bb610 (diff) | |
download | mupdf-9e2886aff8f330f54fb341c98dff3b61163dfc3c.tar.xz |
Avoid scavenging 0 bytes from store when allocating 0 bytes.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/memory.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/fitz/memory.c b/source/fitz/memory.c index d5ea7750..5aa8d78c 100644 --- a/source/fitz/memory.c +++ b/source/fitz/memory.c @@ -67,6 +67,9 @@ fz_malloc(fz_context *ctx, size_t size) void * fz_malloc_no_throw(fz_context *ctx, size_t size) { + if (size == 0) + return NULL; + return do_scavenging_malloc(ctx, size); } |