From 6512edb22e326acdf8267b4d3c0b88fe707bb86f Mon Sep 17 00:00:00 2001 From: dormando Date: Mon, 7 Jun 2021 23:36:37 -0700 Subject: extstore: fix crash on 'stats extstore' if extstore wasn't enabled, crashes. Reported by @zer0e on github. --- storage.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'storage.c') diff --git a/storage.c b/storage.c index 3c0af88..70ac78c 100644 --- a/storage.c +++ b/storage.c @@ -69,6 +69,9 @@ void process_extstore_stats(ADD_STAT add_stats, conn *c) { assert(add_stats); void *storage = c->thread->storage; + if (storage == NULL) { + return; + } extstore_get_stats(storage, &st); st.page_data = calloc(st.page_count, sizeof(struct extstore_page_data)); extstore_get_page_data(storage, &st); -- cgit v1.2.1