diff options
Diffstat (limited to 'cmd/ztest.c')
-rw-r--r-- | cmd/ztest.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/ztest.c b/cmd/ztest.c index 790835363..fb9f83032 100644 --- a/cmd/ztest.c +++ b/cmd/ztest.c @@ -4639,8 +4639,11 @@ ztest_dmu_object_alloc_free(ztest_ds_t *zd, uint64_t id) * Destroy the previous batch of objects, create a new batch, * and do some I/O on the new objects. */ - if (ztest_object_init(zd, od, size, B_TRUE) != 0) + if (ztest_object_init(zd, od, size, B_TRUE) != 0) { + zd->zd_od = NULL; + umem_free(od, size); return; + } while (ztest_random(4 * batchsize) != 0) ztest_io(zd, od[ztest_random(batchsize)].od_object, |