From b7325433aa2e24b31c3356e20acbb22f21dfe3f7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 12 Nov 2001 20:30:12 +0000 Subject: [PATCH] I don't know what I was thinking git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1275 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Reader/Reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index a2e72b2547d..a076bffb3a2 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -614,8 +614,8 @@ Module *ParseBytecodeFile(const string &Filename, string *ErrorStr) { uchar *Buf = (uchar*)mmap(0, FileSize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); assert((Buf != (uchar*)-1) && "mmap returned error!"); - free(FileData); memcpy(Buf, FileData, FileSize); + free(FileData); #else uchar *Buf = FileData; #endif