nv_malloc can fail in userland. Add check to prevent a NULL pointer dereference.
Pointed out by: mjg Approved by: pjd (mentor)