On Thu, 11 Nov 2021 17:06:58 +0200 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > +int tracecmd_output_set_kallsyms(struct tracecmd_output *handler, const char *kallsyms) > +{ > + if (!handler || handler->file_state != TRACECMD_FILE_ALLOCATED) > + return -1; > + > + free(handler->kallsyms); Nit, this isn't a fast path, so the code could be a little cleaner with: handler->kallsyms = NULL; here > + if (kallsyms) { > + handler->kallsyms = strdup(kallsyms); > + if (!handler->kallsyms) > + return -1; > + } else > + handler->kallsyms = NULL; Then removing the else case. -- Steve > + > + return 0; > +} > +