diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-25 15:58:58 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-25 15:58:58 +0000 |
commit | 50c5b4680d0a3d1341f0b0d441c7b5dd4e5cd732 (patch) | |
tree | bf8015cb77ba2b9a1ac24f657a2ab199826f7c41 /tools/llvm-c-test | |
parent | b94be5f21eb43f057a8ea2f8afda3c5fecf9e2d8 (diff) | |
download | external_llvm-50c5b4680d0a3d1341f0b0d441c7b5dd4e5cd732.zip external_llvm-50c5b4680d0a3d1341f0b0d441c7b5dd4e5cd732.tar.gz external_llvm-50c5b4680d0a3d1341f0b0d441c7b5dd4e5cd732.tar.bz2 |
llvm-c-test: Don't leak memory buffers.
Detected by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193416 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-c-test')
-rw-r--r-- | tools/llvm-c-test/module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/llvm-c-test/module.c b/tools/llvm-c-test/module.c index 1802386..2661fc8 100644 --- a/tools/llvm-c-test/module.c +++ b/tools/llvm-c-test/module.c @@ -31,9 +31,11 @@ static LLVMModuleRef load_module(void) { if (LLVMParseBitcode(MB, &M, &msg)) { fprintf(stderr, "Error parsing bitcode: %s\n", msg); + LLVMDisposeMemoryBuffer(MB); exit(1); } + LLVMDisposeMemoryBuffer(MB); return M; } |