Avoid a spurious NullPointerException in java.net.Inet6AddressImpl#icmpEcho

This change adds a couple of null-checks that prevent
NullPointerExceptions while closing the FileDescriptor in
java.net.Inet6AddressImpl#icmpEcho.

Bug: 77818332
Bug: 77836332
Test: CtsLibcoreTestCases

Change-Id: Id00bfe7da1f7b542acaf5431494176da39817e0f
Merged-In: Id00bfe7da1f7b542acaf5431494176da39817e0f
(cherry picked from commit 43b6852f2379af08c6bbc59832900d99f4141a40)
1 file changed