From 0cf2b149945f3595602492f6e856fe68ce17b5fe Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Fri, 6 Jan 2023 09:51:45 -0700 Subject: [PATCH] graphdriver/btrfs: use free wrapper consistently While the Cgo in this entire file is quite questionable, that is a task for another day. Signed-off-by: Bjorn Neergaard (cherry picked from commit d3778d65fac05b67ca58366cd5ba0661a5d5d2a0) Signed-off-by: Sebastiaan van Stijn --- daemon/graphdriver/btrfs/btrfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/graphdriver/btrfs/btrfs.go b/daemon/graphdriver/btrfs/btrfs.go index 0fc2d1718d..b0a4079bb8 100644 --- a/daemon/graphdriver/btrfs/btrfs.go +++ b/daemon/graphdriver/btrfs/btrfs.go @@ -233,7 +233,7 @@ func subvolSnapshot(src, dest, name string) error { var cs = C.CString(name) C.set_name_btrfs_ioctl_vol_args_v2(&args, cs) - C.free(unsafe.Pointer(cs)) + free(cs) _, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(destDir), C.BTRFS_IOC_SNAP_CREATE_V2, uintptr(unsafe.Pointer(&args)))