aboutsummaryrefslogtreecommitdiff
path: root/c/enc/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/enc/hash.h')
-rw-r--r--c/enc/hash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/enc/hash.h b/c/enc/hash.h
index 60fb5df..6362f69 100644
--- a/c/enc/hash.h
+++ b/c/enc/hash.h
@@ -426,7 +426,7 @@ static BROTLI_INLINE void HasherSetup(MemoryManager* m, Hasher* hasher,
ChooseHasher(params, &params->hasher);
alloc_size = HasherSize(params, one_shot, input_size);
hasher->common.extra = BROTLI_ALLOC(m, uint8_t, alloc_size);
- if (BROTLI_IS_OOM(m)) return;
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(hasher->common.extra)) return;
hasher->common.params = params->hasher;
switch (hasher->common.params.type) {
#define INITIALIZE_(N) \