1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

llvm-c-test: Don't leak memory buffers.

Detected by valgrind.

llvm-svn: 193416
This commit is contained in:
Benjamin Kramer 2013-10-25 15:58:58 +00:00
parent 57067f1916
commit f30113219f

View File

@ -31,9 +31,11 @@ static LLVMModuleRef load_module(void) {
if (LLVMParseBitcode(MB, &M, &msg)) { if (LLVMParseBitcode(MB, &M, &msg)) {
fprintf(stderr, "Error parsing bitcode: %s\n", msg); fprintf(stderr, "Error parsing bitcode: %s\n", msg);
LLVMDisposeMemoryBuffer(MB);
exit(1); exit(1);
} }
LLVMDisposeMemoryBuffer(MB);
return M; return M;
} }