diff options
| author | 2021-07-19 07:31:21 +0000 | |
|---|---|---|
| committer | 2021-07-19 07:33:50 +0000 | |
| commit | a4198301d7eb7dcdc0e5319aeea72498a29c4c48 (patch) | |
| tree | 989c69082688a4e252fdbd65aabdc58cd8b88c4a /libs/gui/QueueBufferInputOutput.cpp | |
| parent | 9f0e60e62fa4d8b163ead39768338c0a5507880c (diff) | |
binder: don't dereference NULL
Simply forming a reference to NULL results in undefined behavior
regardless of how the reference is used. Since `outPollFd` and
`errPollFd` are potentially NULL, we should pass them as pointers here.
Caught by clang's static analyzer:
> frameworks/native/libs/binder/UtilsHost.cpp:145:14: warning: Forming
reference to null pointer [clang-analyzer-core.NonNullParamChecker]
> frameworks/native/libs/binder/UtilsHost.cpp:147:14: warning: Forming
reference to null pointer [clang-analyzer-core.NonNullParamChecker]
Bug: None
Test: TreeHugger
Change-Id: Idf8c8291bde0ce0624085afd143096c357246673
Diffstat (limited to 'libs/gui/QueueBufferInputOutput.cpp')
0 files changed, 0 insertions, 0 deletions