diff --git a/iptables/iptables.go b/iptables/iptables.go index 2d6737a..399d10b 100644 --- a/iptables/iptables.go +++ b/iptables/iptables.go @@ -425,6 +425,7 @@ func (ipt *IPTables) runWithOutput(args []string, stdout io.Writer) error { } ul, err := fmu.tryLock() if err != nil { + syscall.Close(fmu.fd) return err } defer ul.Unlock()