Avoid potential memory leak in find_frame_funname