- Fixed memory leak in zpool_vded.Clear

This commit is contained in:
Asmir Selimovic 2020-01-31 08:52:10 +01:00 committed by Gitea
parent 5b0203da39
commit 4dcea86954
1 changed files with 1 additions and 0 deletions

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 { if sc := C.do_zpool_clear(pool.list, csdev, C.ZPOOL_NO_REWIND); sc != 0 {
err = fmt.Errorf("Pool clear failed") err = fmt.Errorf("Pool clear failed")
} }
C.free(unsafe.Pointer(csdev))
return return
} }