We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thanks for the great software. A small leak found with leaks:
leaks
public static func makeAddress(from addr: sockaddr_storage) throws -> Address { switch Int32(addr.ss_family) { case AF_INET: var addr_in = try sockaddr_in.make(from: addr) let maxLength = socklen_t(INET_ADDRSTRLEN) let buffer = UnsafeMutablePointer<CChar>.allocate(capacity: Int(maxLength)) try Socket.inet_ntop(AF_INET, &addr_in.sin_addr, buffer, maxLength) return .ip4(String(cString: buffer), port: UInt16(addr_in.sin_port).byteSwapped) case AF_INET6: var addr_in6 = try sockaddr_in6.make(from: addr) let maxLength = socklen_t(INET6_ADDRSTRLEN) let buffer = UnsafeMutablePointer<CChar>.allocate(capacity: Int(maxLength)) try Socket.inet_ntop(AF_INET6, &addr_in6.sin6_addr, buffer, maxLength) return .ip6(String(cString: buffer), port: UInt16(addr_in6.sin6_port).byteSwapped) ... }
buffer is leaked. Should be an easy fix.
buffer
The text was updated successfully, but these errors were encountered:
Thank you for reporting this. 🙏🏻
Fixed via #63
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Thanks for the great software. A small leak found with
leaks
:buffer
is leaked. Should be an easy fix.The text was updated successfully, but these errors were encountered: