sock: check if hdr->addr should actually be free()'d

This commit is contained in:
Matheus
2024-04-07 21:43:25 -03:00
parent 6b5d9b9715
commit 989621840e
+1
View File
@@ -89,6 +89,7 @@ static inline int sock_copymsghdr(msghdr_t *khdr, msghdr_t *uhdr) {
static inline void sock_freemsghdr(msghdr_t *hdr) {
free(hdr->iov);
if (hdr->addr)
free(hdr->addr);
}