From f2f2084e79c3546b38fb635401588afdd0560392 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Thu, 19 Dec 2019 17:15:57 -0800 Subject: [PATCH] Ehooks: Assert alloc isn't NULL --- src/ehooks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ehooks.c b/src/ehooks.c index 2fb2c4c4..78c28340 100644 --- a/src/ehooks.c +++ b/src/ehooks.c @@ -6,6 +6,8 @@ void ehooks_init(ehooks_t *ehooks, extent_hooks_t *extent_hooks, unsigned ind) { + /* All other hooks are optional; this one is not. */ + assert(extent_hooks->alloc != NULL); ehooks->ind = ind; ehooks_set_extent_hooks_ptr(ehooks, extent_hooks); }