binder: fix coverity warnings
Bug: None
Test: build
Change-Id: I7d56bb75c8fe6bb3206855c06959f81335971c4b
Signed-off-by: wangmingming1 <wangmingming1@xiaomi.com>
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 7de94e3..fb2781b 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -492,6 +492,7 @@
if (read(fd, &on, sizeof(on)) == -1) {
ALOGE("%s: error reading to %s: %s", __func__,
names[static_cast<int>(feature)], strerror(errno));
+ close(fd);
return false;
}
close(fd);