On Mon, May 11, 2026 at 02:08:53PM +0800, Hongfu Li wrote: > Add NULL checks after malloc() in three helper functions to prevent > NULL pointer dereference on memory allocation failure. > - cg_name() > - cg_name_indexed() > - cg_control() > > These functions allocate memory with malloc() but previously called > snprintf() unconditionally, which would trigger undefined behavior > if allocation fails. > > Signed-off-by: Hongfu Li <[email protected]> > ---
Reviewed-by: Vishal Moola <[email protected]>

