diff --git a/examples/nvme/hotplug/hotplug.c b/examples/nvme/hotplug/hotplug.c index 5b16279a6..5d76a9128 100644 --- a/examples/nvme/hotplug/hotplug.c +++ b/examples/nvme/hotplug/hotplug.c @@ -151,6 +151,7 @@ alloc_task(struct dev_ctx *dev) task->buf = spdk_dma_zmalloc(g_io_size_bytes, 0x200, NULL); if (task->buf == NULL) { + free(task); return NULL; }