tag | 77d83fdc900df80be31ff237d8b86bd6f494a2e6 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Nov 04 10:53:01 2016 -0700 |
object | aba2d911b9c29cb55fa22d95234f9c9b926b8c4d |
Android n mr1 preview 1
commit | aba2d911b9c29cb55fa22d95234f9c9b926b8c4d | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Tue Oct 04 16:33:15 2016 -0700 |
committer | George Burgess IV <gbiv@google.com> | Tue Oct 04 16:33:15 2016 -0700 |
tree | 4ca7d47564b6da9aaf24795bdb9ad5155531d9cc | |
parent | a9535dd8f0bd8037bfde9ada827bfd2dbd9b9220 [diff] |
Fix a memory leak. clang-tidy complained that there are cases where `cmd` wouldn't be freed in this function (specifically if allocation of `cmd` succeeded, and `!mSensorState[handle].sensorType`). Moving the free to the end of the function fixes this issue. Bug: None. Test: Still builds. Change-Id: Id89c7fcd4d1e54e45e2427f81dde6bb1c6f0975b