Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a53fdae6 authored by John Stultz's avatar John Stultz Committed by Daniel Rosenberg
Browse files

ANDROID: ion_dummy_driver: Use IS_ERR_OR_NULL() before destroying heaps



Previously ion_heap_create() would return only NULL,
then ion_heap_destroy() would ignore null values safely.

But recently ion_heap_create() was changed to potentially
return an ERR_PTR() value, which can cause crashes when
ion_heap_destroy() is called on it.

Thus, check IS_ERR_OR_NULL() before calling ion_heap_destroy()

Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Change-Id: I8477961cded562ba4b1b2e2a30622e23a492cf58
parent 47d813fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment