[BOLT] close map_files FD (#156489)
The BOLT runtime currently does not close the FD pointing to /proc/self/map_files. This does not actually hurt anything but was at least a bit of a red herring for me when looking through strace on a BOLT instrumented binary.
This commit is contained in:
parent
d29dc18992
commit
3f4d116978
@ -714,9 +714,11 @@ static char *getBinaryPath() {
|
||||
uint32_t Ret = __readlink(FindBuf, TargetPath, sizeof(TargetPath));
|
||||
assert(Ret != -1 && Ret != BufSize, "readlink error");
|
||||
TargetPath[Ret] = '\0';
|
||||
__close(FDdir);
|
||||
return TargetPath;
|
||||
}
|
||||
}
|
||||
__close(FDdir);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user