[PATCH openEuler-22.03-LTS-SP1] gtp: fix a potential NULL pointer dereference