examples/ipsec_secgw: fix possible null dereference