mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +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) {
|
static inline void sock_freemsghdr(msghdr_t *hdr) {
|
||||||
free(hdr->iov);
|
free(hdr->iov);
|
||||||
free(hdr->addr);
|
if (hdr->addr)
|
||||||
|
free(hdr->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
socket_t *udp_createsocket();
|
socket_t *udp_createsocket();
|
||||||
|
|||||||
Reference in New Issue
Block a user