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