nuttx/drivers/analog
hanzj 36bdf9fb37 drivers/analog/dac7554: Add NULL checks after kmm_malloc in dac7554_initialize
dac7554_initialize() calls kmm_malloc twice without checking the return
value.  If either allocation fails, the subsequent pointer dereferences
lead to a NULL pointer access and crash.

Add NULL checks for both allocations, following the pattern already used
in mcp3008.c, mcp48xx.c, and mcp47x6.c.  When the second allocation
fails, free the first allocation before returning NULL.

Signed-off-by: hanzj <hanzjian@zepp.com>
2026-05-30 17:50:14 +08:00
..
ad5410.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
adc.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ads1115.c drivers/analog: Fix memory leak in ads1115_initialize. 2026-05-29 09:43:06 +08:00
ads1242.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ads1255.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ads7046.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ads7828.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
CMakeLists.txt drivers/analog/ads7046: Add support for ADS7046 ADC 2025-08-22 00:29:55 +08:00
comp.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
dac.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
dac7554.c drivers/analog/dac7554: Add NULL checks after kmm_malloc in dac7554_initialize 2026-05-30 17:50:14 +08:00
dac7571.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
hx711.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
Kconfig drivers/analog/ads7046: Add support for ADS7046 ADC 2025-08-22 00:29:55 +08:00
lmp92001.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ltc1867l.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
Make.defs drivers/analog/ads7046: Add support for ADS7046 ADC 2025-08-22 00:29:55 +08:00
max1161x.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
mcp47x6.c drivers/analog: fix dead free and memory leak in mcp48xx and mcp47x6. 2026-05-28 02:18:58 +02:00
mcp48xx.c drivers/analog: fix dead free and memory leak in mcp48xx and mcp47x6. 2026-05-28 02:18:58 +02:00
mcp3008.c drivers/analog: Fix memory leak and dead code in mcp3008_initialize. 2026-05-29 01:26:57 +08:00
opamp.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
pga11x.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00