On 01/03/2018 08:08, Julia Suvorova wrote: > +static void free_progname(void) > +{ > + g_free(progname); > +} > + > static void GCC_FMT_ATTR(2, 3) readline_printf_func(void *opaque, > const char *fmt, ...) > { > @@ -504,7 +509,8 @@ int main(int argc, char **argv) > #endif > > module_call_init(MODULE_INIT_TRACE); > - progname = basename(argv[0]); > + progname = g_path_get_basename(argv[0]); > + atexit(free_progname);
This atexit is not needed; memory is always freed on exit. But, it's good that you thought about it! I can queue this patch for merging once I get an ack from Alex Williamson (VFIO). Thanks, Paolo