mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
sock: check if hdr->addr should actually be free()'d
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user