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
Loading
Please register or sign in to comment