diff --git a/examples/bdev/fio_plugin/fio_plugin.c b/examples/bdev/fio_plugin/fio_plugin.c index 5133d2086..10f4914fd 100644 --- a/examples/bdev/fio_plugin/fio_plugin.c +++ b/examples/bdev/fio_plugin/fio_plugin.c @@ -164,10 +164,13 @@ spdk_fio_stop_poller(struct spdk_bdev_poller **ppoller) fio_poller = *(struct spdk_fio_poller **)ppoller; fio_thread = g_thread; - if (fio_thread) { - TAILQ_REMOVE(&fio_thread->pollers, fio_poller, link); + if (!fio_thread) { + SPDK_ERRLOG("Expected local thread to be initialized, but it was not.\n"); + return; } + TAILQ_REMOVE(&fio_thread->pollers, fio_poller, link); + free(fio_poller); *ppoller = NULL; }