From b2f019ec1eb2dec1c87050dcf797cc8538d805b9 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Thu, 1 Sep 2016 19:09:02 +0100 Subject: [PATCH] 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 --- liblog/event_tag_map.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liblog/event_tag_map.c b/liblog/event_tag_map.c index 3cb04cf47..345f0d360 100644 --- a/liblog/event_tag_map.c +++ b/liblog/event_tag_map.c @@ -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: