         let size = data.count
         let buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: size)
         defer {
-            buffer.deallocate(capacity: size)
+            buffer.deallocate()
         }
 
         data.copyBytes(to: buffer, count: size)

        var data = Data()
        let buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: 1)
        defer {
            buffer.deallocate(capacity: 1)
        }

        while true {

                            useHardwareFlowControl: Bool = false,
                            useSoftwareFlowControl: Bool = false,
                            processOutput: Bool = false) {

        guard let fileDescriptor = fileDescriptor else {
            return
        }
