[PATCH openEuler-1.0-LTS v2] ftrace: Fix possible use-after-free issue in ftrace_location()