Merge "Release the memory allocated in the algorithm to prevent memory leaks" am: a3fe17250d am: a80338f802 am: 89b620d117

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2186106

Change-Id: I0d9fadac7dfe9b94340fa900e744258aa6eda345
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>