- Prevent double-free failure when the same dataset is closed multiple times

In some cases, copying dataset object, either by passing by value or in
some other pattern can lead to code that will close the same dataset
multiple times (e.g. defer). Or otherwise, code with complicated
handling of dataset cleanup.
Fixes: #30, Closes: #31
This commit is contained in:
Faruk Kasumovic
2020-09-09 10:22:37 +02:00
parent 768fbf7f22
commit 039b070d1a
5 changed files with 62 additions and 13 deletions
+1
View File
@@ -60,4 +60,5 @@ func TestDataset_DestroyPromote(t *testing.T) {
t.Log("Destroy promote completed with success")
d.Close()
zpoolTestPoolDestroy(t)
cleanupVDisks()
}