mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-27 22:15:18 +00:00
Fix use-after-free error.
llvm-svn: 109288
This commit is contained in:
parent
7049c83125
commit
e64c7514fb
@ -79,10 +79,10 @@ namespace llvm {
|
||||
(const unsigned char *)Buffer->getBufferEnd())) {
|
||||
std::string ErrMsg;
|
||||
Module *M = ParseBitcodeFile(Buffer, Context, &ErrMsg);
|
||||
// ParseBitcodeFile does not take ownership of the Buffer.
|
||||
delete Buffer;
|
||||
if (M == 0)
|
||||
Err = SMDiagnostic(Buffer->getBufferIdentifier(), ErrMsg);
|
||||
// ParseBitcodeFile does not take ownership of the Buffer.
|
||||
delete Buffer;
|
||||
return M;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user