[OpenMP][libomptarget] Minor fix in x86_64 plugin

Call to remove() was passing invalid address for the file name.

Differential Revision: https://reviews.llvm.org/D109846
This commit is contained in:
Hansang Bae 2021-09-15 14:04:35 -05:00
parent d249200fa7
commit ae2a5facce
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@
/// Array of Dynamic libraries loaded for this target.
struct DynLibTy {
char *FileName;
std::string FileName;
void *Handle;
};
@ -100,7 +100,7 @@ public:
for (auto &lib : DynLibs) {
if (lib.Handle) {
dlclose(lib.Handle);
remove(lib.FileName);
remove(lib.FileName.c_str());
}
}
}