From 4dcea8695430752080b12b37953712457738b32f Mon Sep 17 00:00:00 2001 From: Asmir Selimovic Date: Fri, 31 Jan 2020 08:52:10 +0100 Subject: [PATCH] - Fixed memory leak in zpool_vded.Clear --- zpool_vdev.go | 1 + 1 file changed, 1 insertion(+) diff --git a/zpool_vdev.go b/zpool_vdev.go index 379ea9e..903735e 100644 --- a/zpool_vdev.go +++ b/zpool_vdev.go @@ -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 }