Files
kernel_xiaomi_sm8250/drivers
Lee Jones 9e47d3f94d ANDROID: android-verity: Prevent double-freeing metadata
If extract_metadata() fails, it will free metadata in its own error
path, so it is safe to simply return the provided error value without
worrying about resource handling/releasing.

Moreover, if we simply return in extract_metadata()'s error path, we
can assume the thread of execution will only make it down into the
free_metadata: tag area sometime after extract_metadata()'s success,
in which case metadata will need to be freed without question.

Bug: 234030265
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I1bf42ff9ecef3eea26543526c6955d7823d45c43
2025-02-13 00:24:31 +02:00
..
2024-02-23 08:12:44 +01:00