Skip to content

Commit 1e82895

Browse files
codypssofar
authored andcommitted
simplify ps_first iteration for freeing
1 parent b72d185 commit 1e82895

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/bootchart.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ int main(int argc, char *argv[]) {
505505

506506
/* nitpic cleanups */
507507
ps = ps_first->next_ps;
508-
while (ps->next_ps) {
508+
while (ps) {
509509
struct ps_struct *old;
510510

511511
old = ps;
@@ -522,9 +522,6 @@ int main(int argc, char *argv[]) {
522522
free(old);
523523
}
524524

525-
free(ps->cgroup);
526-
free(ps->sample);
527-
free(ps);
528525
free(ps_first);
529526

530527
sampledata = head;

0 commit comments

Comments
 (0)