Fix a tiny test-only leak, found by LSan.
llvm-svn: 207137
This commit is contained in:
parent
a4b7cfd64f
commit
655af097a1
|
@ -49,14 +49,14 @@ struct TestVFO {
|
|||
}
|
||||
|
||||
~TestVFO() {
|
||||
if (!Contents)
|
||||
return;
|
||||
char *BufPtr;
|
||||
unsigned BufSize;
|
||||
clang_VirtualFileOverlay_writeToBuffer(VFO, 0, &BufPtr, &BufSize);
|
||||
std::string BufStr(BufPtr, BufSize);
|
||||
EXPECT_STREQ(Contents, BufStr.c_str());
|
||||
free(BufPtr);
|
||||
if (Contents) {
|
||||
char *BufPtr;
|
||||
unsigned BufSize;
|
||||
clang_VirtualFileOverlay_writeToBuffer(VFO, 0, &BufPtr, &BufSize);
|
||||
std::string BufStr(BufPtr, BufSize);
|
||||
EXPECT_STREQ(Contents, BufStr.c_str());
|
||||
free(BufPtr);
|
||||
}
|
||||
clang_VirtualFileOverlay_dispose(VFO);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue