Android n mr1 preview 2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEABECAAYFAlhGDs4ACgkQ6K0/gZqxDnhSMgCfVs4efIsahScAHgbnqN8xKkLo
99wAnRHedwn7GHk0CzJW6g15X56SyVyo
=W5VN
-----END PGP SIGNATURE-----
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
1 file changed