nvme/perf: don't crash if no namespaces are usable
Change-Id: I8ecf5b632c2d3bf94f913fb5e0aa5b4ff2e68c40 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
b7b8dea6f2
commit
3da8af26b0
@ -772,6 +772,10 @@ associate_workers_with_ns(void)
|
|||||||
count = g_num_namespaces > g_num_workers ? g_num_namespaces : g_num_workers;
|
count = g_num_namespaces > g_num_workers ? g_num_namespaces : g_num_workers;
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
|
if (entry == NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ns_ctx = malloc(sizeof(struct ns_worker_ctx));
|
ns_ctx = malloc(sizeof(struct ns_worker_ctx));
|
||||||
if (!ns_ctx) {
|
if (!ns_ctx) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user