mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
sock: check if hdr->addr should actually be free()'d
This commit is contained in:
@@ -89,6 +89,7 @@ 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);
|
||||||
|
if (hdr->addr)
|
||||||
free(hdr->addr);
|
free(hdr->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user