On Thu, Mar 24, 2022 at 3:15 PM jianchunfu <jianchunfu@xxxxxxxxxxxxxxxxxxxx> wrote: > > Add judgment to fix the potential stack overflow risk. > trigger_name = malloc(IIO_MAX_NAME_LENGTH); > + if (!trigger_name) { > + ret = -ENOMEM; > + goto error; > + } Isn't malloc() sets errno? Why not use it instead? -- With Best Regards, Andy Shevchenko