return ttrace;
}
+static void thread_trace__free_files(struct thread_trace *ttrace);
+
static void thread_trace__delete(void *pttrace)
{
struct thread_trace *ttrace = pttrace;
intlist__delete(ttrace->syscall_stats);
ttrace->syscall_stats = NULL;
+ thread_trace__free_files(ttrace);
zfree(&ttrace->entry_str);
free(ttrace);
}
static const size_t trace__entry_str_size = 2048;
+static void thread_trace__free_files(struct thread_trace *ttrace)
+{
+ for (int i = 0; i < ttrace->files.max; ++i) {
+ struct file *file = ttrace->files.table + i;
+ zfree(&file->pathname);
+ }
+
+ zfree(&ttrace->files.table);
+ ttrace->files.max = -1;
+}
+
static struct file *thread_trace__files_entry(struct thread_trace *ttrace, int fd)
{
if (fd < 0)