diff options
Diffstat (limited to 'src/firemon/cpu.c')
-rw-r--r-- | src/firemon/cpu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/firemon/cpu.c b/src/firemon/cpu.c index 47c935686..2a6979573 100644 --- a/src/firemon/cpu.c +++ b/src/firemon/cpu.c | |||
@@ -39,9 +39,7 @@ static void print_cpu(int pid) { | |||
39 | if (strncmp(buf, "Cpus_allowed_list:", 18) == 0) { | 39 | if (strncmp(buf, "Cpus_allowed_list:", 18) == 0) { |
40 | printf(" %s", buf); | 40 | printf(" %s", buf); |
41 | fflush(0); | 41 | fflush(0); |
42 | free(file); | 42 | break; |
43 | fclose(fp); | ||
44 | return; | ||
45 | } | 43 | } |
46 | } | 44 | } |
47 | fclose(fp); | 45 | fclose(fp); |
@@ -56,7 +54,7 @@ void cpu(pid_t pid, int print_procs) { | |||
56 | for (i = 0; i < max_pids; i++) { | 54 | for (i = 0; i < max_pids; i++) { |
57 | if (pids[i].level == 1) { | 55 | if (pids[i].level == 1) { |
58 | if (print_procs || pid == 0) | 56 | if (print_procs || pid == 0) |
59 | pid_print_list(i, 0); | 57 | pid_print_list(i, arg_nowrap); |
60 | int child = find_child(i); | 58 | int child = find_child(i); |
61 | if (child != -1) | 59 | if (child != -1) |
62 | print_cpu(child); | 60 | print_cpu(child); |