From 7eae92f5719c0a55706ee7f9f01761f01eec7524 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Sat, 1 Oct 2016 14:44:34 +0300 Subject: [PATCH] fix fd leak --- send.go | 1 + 1 file changed, 1 insertion(+) diff --git a/send.go b/send.go index bfd6046..356cd3e 100644 --- a/send.go +++ b/send.go @@ -84,6 +84,7 @@ func Send(w io.Writer, parent string, subvols ...string) error { flags |= _BTRFS_SEND_FLAG_OMIT_END_CMD } err = send(w, fs.f, parentID, cloneSrc, flags) + fs.Close() if err != nil { return fmt.Errorf("error sending %s: %v", sub, err) }