From afc8c1b7622129882a120b665e0e36a1dad30f0b Mon Sep 17 00:00:00 2001 From: Jia Chen Date: Fri, 30 Jun 2017 09:14:44 -0700 Subject: [PATCH] [infer][backend] Deallocate local variables before formal parameters Reviewed By: jeremydubreil Differential Revision: D5344645 fbshipit-source-id: eb14ac7 --- infer/src/backend/PropUtil.re | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infer/src/backend/PropUtil.re b/infer/src/backend/PropUtil.re index 8b9a8f815..3495c7bad 100644 --- a/infer/src/backend/PropUtil.re +++ b/infer/src/backend/PropUtil.re @@ -190,8 +190,8 @@ let remove_locals_ret tenv (curr_f: Procdesc.t) p => /** Remove locals and formal parameters from the prop. Return the list of stack variables whose address was still present after deallocation. */ let remove_locals_formals tenv (curr_f: Procdesc.t) p => { - let (pvars1, p1) = remove_formals tenv curr_f p; - let (pvars2, p2) = remove_locals tenv curr_f p1; + let (pvars1, p1) = remove_locals tenv curr_f p; + let (pvars2, p2) = remove_formals tenv curr_f p1; (pvars1 @ pvars2, p2) };