[PATCH 6.7 280/334] ipv6: sr: fix possible use-after-free and null-ptr-deref