Merge "Fix the UAF bug caused by a dead stack variable" into nyc-dev