Messages in this thread |  | | Date | Mon, 27 Apr 2026 10:44:58 +0300 | | From | Andy Shevchenko <> | | Subject | Re: [PATCH] iio: adc: meson-saradc: fix calibration buffer leak on error |
| |
On Sun, Apr 26, 2026 at 12:07:24AM +0800, Felix Gu wrote: > meson_sar_adc_temp_sensor_init() allocates a buffer with > nvmem_cell_read(), but the old code leaked it if > syscon_regmap_lookup_by_phandle() failed.
> Switch buf to __free(kfree) so all return paths release it.
__free() is defined in cleanup.h which is missing in the driver. Please add the include to it.
-- With Best Regards, Andy Shevchenko
|  |