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

iEYEABECAAYFAlgcyv0ACgkQ6K0/gZqxDnge+wCfTqM9fCaOLyR6Tf9IFgJaCYak
pjgAnRIMIeoO/+yLY6fEC6H55sKzkMPV
=lt6G
-----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