summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2018-06-01 16:47:42 -0700
committerEtan Cohen <etancohen@google.com>2018-06-01 16:47:42 -0700
commit0f8285e1e039af673f0cc3a3d76ed071da875d79 (patch)
treea2a47fe8dac9fe0496b161f02cbe41085a3aaae3 /service
parent7321b5dc86ba9f9de31588bf726008bf8a13138a (diff)
[WIFI] Add null check before variable access to prevent an APR
Bug: 80498990 Test: None - not clear how to trigger Change-Id: Ic86a3ca660aa364a647e80577e6c7a92599b1da7
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/util/WifiAsyncChannel.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/util/WifiAsyncChannel.java b/service/java/com/android/server/wifi/util/WifiAsyncChannel.java
index 08025e3ea..4526d68a4 100644
--- a/service/java/com/android/server/wifi/util/WifiAsyncChannel.java
+++ b/service/java/com/android/server/wifi/util/WifiAsyncChannel.java
@@ -90,10 +90,12 @@ public class WifiAsyncChannel extends AsyncChannel {
.c(msg.what)
.flush();
Message replyMessage = super.sendMessageSynchronously(msg);
- getOrInitLog().trace("sendMessageSynchronously.recv message=% sendingUid=%")
- .c(replyMessage.what)
- .c(replyMessage.sendingUid)
- .flush();
+ if (replyMessage != null) {
+ getOrInitLog().trace("sendMessageSynchronously.recv message=% sendingUid=%")
+ .c(replyMessage.what)
+ .c(replyMessage.sendingUid)
+ .flush();
+ }
return replyMessage;
}