- Fixed memory leak in zpool_vded.Clear

This commit is contained in:
2020-02-03 10:56:20 +00:00
committed by Gitea
parent 5b0203da39
commit 4dcea86954
+1
View File
@@ -76,6 +76,7 @@ func (pool *Pool) Clear(device string) (err error) {
if sc := C.do_zpool_clear(pool.list, csdev, C.ZPOOL_NO_REWIND); sc != 0 {
err = fmt.Errorf("Pool clear failed")
}
C.free(unsafe.Pointer(csdev))
return
}