]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/sysv_shm.c
xnu-3789.51.2.tar.gz
[apple/xnu.git] / bsd / kern / sysv_shm.c
index c397788c2f02684570d0e83982aab02d800a5d7a..4a47b7ac256428e8ce6e6c5015164e99eb4824a1 100644 (file)
@@ -411,7 +411,7 @@ shmat(struct proc *p, struct shmat_args *uap, user_addr_t *retval)
             goto shmat_out;
                }
 
-               MALLOC(shmmap_s, struct shmmap_state *, size, M_SHM, M_WAITOK);
+               MALLOC(shmmap_s, struct shmmap_state *, size, M_SHM, M_WAITOK | M_NULL);
                if (shmmap_s == NULL) {
                        shmat_ret = ENOMEM;
                        goto shmat_out;