liblog: don't bother keeping FD around once it's mapped.

Posix and linux explicitly state that this isn't necessary.

bug: 30963384
Change-Id: I2cc16ded04f0ebc909dc3027e02867594fb49d05
This commit is contained in:
Narayan Kamath 2016-09-01 19:09:02 +01:00
parent 0c572d01af
commit bfd8eafa1d
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,9 @@ LIBLOG_ABI_PUBLIC EventTagMap* android_openEventTagMap(const char* fileName)
if (processFile(newTagMap) != 0)
goto fail;
if (fd >= 0)
close(fd);
return newTagMap;
fail: