From 5088bbae4ae8cfe7185c30b333e3ea2593d81947 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Thu, 2 Nov 2023 07:37:21 +0900 Subject: [PATCH] Add assert of CacheDisk is not nullptr (#10704) --- src/iocore/cache/Cache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iocore/cache/Cache.cc b/src/iocore/cache/Cache.cc index 614fd60c91e..a01c22b7904 100644 --- a/src/iocore/cache/Cache.cc +++ b/src/iocore/cache/Cache.cc @@ -1266,7 +1266,8 @@ cplist_init() { cp_list_len = 0; for (int i = 0; i < gndisks; i++) { - CacheDisk *d = gdisks[i]; + CacheDisk *d = gdisks[i]; + ink_assert(d != nullptr); DiskStripe **dp = d->disk_vols; for (unsigned int j = 0; j < d->header->num_volumes; j++) { ink_assert(dp[j]->dpb_queue.head);