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
+2 -1
View File
@@ -89,7 +89,8 @@ static inline int sock_copymsghdr(msghdr_t *khdr, msghdr_t *uhdr) {
static inline void sock_freemsghdr(msghdr_t *hdr) {
free(hdr->iov);
free(hdr->addr);
if (hdr->addr)
free(hdr->addr);
}
socket_t *udp_createsocket();