On Fri, 8 Feb 2019 15:49:16 +0200 Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx> wrote: > +static void tracecmd_remove_one_instance(struct buffer_instance *instance) > +{ > + char *path; > + > + if (instance->tracing_on_fd > 0) { > + close(instance->tracing_on_fd); > + instance->tracing_on_fd = 0; Also note that uninitialized file descriptors should be a negative number (-1), because zero is a valid descriptor value. -- Steve > } > + path = get_instance_dir(instance); > + tracecmd_put_tracing_file(path); > } >