From dec7b1e1e5290fdba9dcede101800f63b2287c12 Mon Sep 17 00:00:00 2001 From: wangmingming1 Date: Tue, 6 Feb 2024 10:17:07 +0800 Subject: binder: fix coverity warnings Bug: None Test: build Change-Id: I7d56bb75c8fe6bb3206855c06959f81335971c4b Signed-off-by: wangmingming1 --- libs/binder/ProcessState.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/binder/ProcessState.cpp') diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 7de94e3c6c..fb2781be59 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -492,6 +492,7 @@ bool ProcessState::isDriverFeatureEnabled(const DriverFeature feature) { if (read(fd, &on, sizeof(on)) == -1) { ALOGE("%s: error reading to %s: %s", __func__, names[static_cast(feature)], strerror(errno)); + close(fd); return false; } close(fd); -- cgit v1.2.3-59-g8ed1b