[clang] c2fab5a - Fix memory leak in unit test
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 09:14:01 PDT 2024
Author: Aaron Ballman
Date: 2024-07-15T12:13:49-04:00
New Revision: c2fab5a4c69c857061b06b9a826bf4730821e483
URL: https://github.com/llvm/llvm-project/commit/c2fab5a4c69c857061b06b9a826bf4730821e483
DIFF: https://github.com/llvm/llvm-project/commit/c2fab5a4c69c857061b06b9a826bf4730821e483.diff
LOG: Fix memory leak in unit test
Added:
Modified:
clang/tools/c-index-test/c-index-test.c
Removed:
################################################################################
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 46016c115b999..f472a67f3bc5b 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -1852,7 +1852,7 @@ static enum CXChildVisitResult PrintBinOps(CXCursor C, CXCursor p,
bok = clang_Cursor_getBinaryOpcode(C);
opstr = clang_Cursor_getBinaryOpcodeStr(bok);
printf(" BinOp=%s %d\n", clang_getCString(opstr), bok);
-
+ clang_disposeString(opstr);
return CXChildVisit_Recurse;
}
More information about the cfe-commits
mailing list