X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..e2d2fc5c71f7d145cba7267989251af45e3bb5ba:/bsd/net/if_media.c diff --git a/bsd/net/if_media.c b/bsd/net/if_media.c index d96442ada..7c2e4be3f 100644 --- a/bsd/net/if_media.c +++ b/bsd/net/if_media.c @@ -331,6 +331,8 @@ ifmedia_ioctl( if (ifmr->ifm_count != 0) { kptr = (int *) _MALLOC(ifmr->ifm_count * sizeof(int), M_TEMP, M_WAITOK); + if (kptr == NULL) + return ENOBUFS; /* * Get the media words from the interface's list.