Fix memory leak when syntax error while getting function arguments