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:
parent
57067f1916
commit
f30113219f
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user