summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorcao <[email protected]>2016-10-13 02:16:47 +0800
committerBrian Behlendorf <[email protected]>2016-10-12 11:16:47 -0700
commit06cf4d989058a65f72b140d85e2c21effd3b3834 (patch)
tree0720a7c874084e577e2aad3baa8767c198ec9f60 /cmd
parentaf4db70f368d0e9c9ad90f0837a77e511a77b0a7 (diff)
Fix coverity defects: CID 147606, 147609
coverity scan CID:147606, Type:resource leak coverity scan CID:147609, Type:resource leak Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5245
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ztest/ztest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 1491e8734..2e4dae3a9 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -6281,8 +6281,11 @@ ztest_run(ztest_shared_t *zs)
kthread_t *thread;
if (t < ztest_opts.zo_datasets &&
- ztest_dataset_open(t) != 0)
+ ztest_dataset_open(t) != 0) {
+ umem_free(tid,
+ ztest_opts.zo_threads * sizeof (kt_did_t));
return;
+ }
VERIFY3P(thread = zk_thread_create(NULL, 0,
(thread_func_t)ztest_thread,