diff options
author | Luo Xionghu <xionghu.luo@intel.com> | 2015-10-20 03:11:05 -0400 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-10-20 17:11:17 +0800 |
commit | dcc189bed5b395d6fbcdffa29e60e68cf1071310 (patch) | |
tree | cd2a13f5b2ce42e60afe1d61d5c89a416cab7ec8 | |
parent | 566b153e1124de894cdcbd63aa11782f54bbef02 (diff) |
reset the variables in printf_paser to NULL.
the printfPaser variables g1Xg2Xg3 and wg_offset should be reinit
after the builder is deleted, or else the variables will be freed and
caused memory leak;
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Ruiling Song <ruiling.song@intel.com>
-rw-r--r-- | backend/src/llvm/llvm_printf_parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/src/llvm/llvm_printf_parser.cpp b/backend/src/llvm/llvm_printf_parser.cpp index 1e8427c5..bdaed8ab 100644 --- a/backend/src/llvm/llvm_printf_parser.cpp +++ b/backend/src/llvm/llvm_printf_parser.cpp @@ -723,6 +723,8 @@ error: deadprintfs.clear(); delete builder; + g1Xg2Xg3 = NULL; + wg_offset = NULL; return changed; } |