Fix malloc semantics (M_NOWAIT->M_INTWAIT/M_WAITOK).