c63ea608aa
- Avoids a potential crash if the handle is invalid, and also makes this code accurate to real kernel behavior.