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
This commit is contained in:
Benjamin Kramer 2013-10-25 15:58:58 +00:00
parent b94be5f21e
commit 50c5b4680d

View File

@ -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;
}