perf tools: Release session and symbol resources on exit
[deliverable/linux.git] / tools / perf / builtin-record.c
index 5ae0d93d8597610aaf3a24ed2ea539e47fa2eda1..ff77b805de71ac1b0d058a1489efd34797b9a004 100644 (file)
@@ -440,6 +440,7 @@ static void atexit_header(void)
                process_buildids();
                perf_header__write(&session->header, output, true);
                perf_session__delete(session);
+               symbol__exit();
        }
 }
 
@@ -871,7 +872,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
        } else {
                all_tids=malloc(sizeof(pid_t));
                if (!all_tids)
-                       return -ENOMEM;
+                       goto out_symbol_exit;
 
                all_tids[0] = target_tid;
                thread_num = 1;
@@ -918,5 +919,7 @@ out_free_fd:
        }
        free(all_tids);
        all_tids = NULL;
+out_symbol_exit:
+       symbol__exit();
        return err;
 }
This page took 0.02495 seconds and 5 git commands to generate.