]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/if_media.c
xnu-1699.24.23.tar.gz
[apple/xnu.git] / bsd / net / if_media.c
index d96442ada4d47a4111cd40621bf0ce198cdf85ed..7c2e4be3f51eaf4c3d3840168574200c0856ebbc 100644 (file)
@@ -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.