summaryrefslogtreecommitdiff
path: root/gatekeeperd
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-07-10 09:47:09 -0700
committerAndres Morales <anmorales@google.com>2015-07-10 09:47:09 -0700
commit0b0435ea87f87b31652a2c6272c1f77438bfcdf1 (patch)
tree760237003a8598462e0b8a0d2977acfc63d88b8d /gatekeeperd
parent8104616696ac5e806b16a393ea02c4f5d8efc328 (diff)
[gatekeeperd] fix file descriptor leak
Bug: 22403703 Change-Id: I65da3b3b3f85db035d79277344beb5460cb025f2
Diffstat (limited to 'gatekeeperd')
-rw-r--r--gatekeeperd/gatekeeperd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp
index 6622df979..cd6d18fc9 100644
--- a/gatekeeperd/gatekeeperd.cpp
+++ b/gatekeeperd/gatekeeperd.cpp
@@ -112,6 +112,7 @@ public:
int fd = open(filename, O_RDONLY);
if (fd < 0) return 0;
read(fd, &sid, sizeof(sid));
+ close(fd);
return sid;
}