- Fixed memory leak in zpool_vded.Clear
This commit is contained in:
parent
5b0203da39
commit
4dcea86954
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue