[PATCH 5.15 222/245] ipv6: sr: fix possible use-after-free and null-ptr-deref