capsicum: don't leave error values in structures

If fget for a file descriptor returns an error value rather
than a pointer, ensure the error value is not stored in any
structures -- store NULL instead.